How can I set checkbox onsave event using script?

Hell all,

I am trying to check the check box on the selection of item_code.

But after saving the document automatically it is unchecking.

Here is my code:

item_code: function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
if(d.idx == 25){
d.page_break = ‘Checked’;
refresh_field(“items”);

Thanks,
VIjay

call this code on “before_save” event, you can also try d.page_break = 1

1 Like

@ mukesh_variyani

Thanks!
d.page_break =1; is working.