ERPNext.com Frappe Cloud Support Partners Foundation

Checkbox not getting set in new doc

Hi ,

I’m using the following snippet in a custom script

frappe.new_doc('Sales Invoice', {
"customer": cur_frm.doc.default_customer,
"company": cur_frm.doc.company,
"is_pos": 1
});

All fields are getting set as expected with the exception of the checkbox field (is_pos). Am I missing anything or is this a bug?

Any help will be much appreciated

Kind regards

Still hoping for some pointers…

Hi @wale, Try to set value “1” within quotes. (like “is_pos”: “1”)

Hi @Nivedha

Thanks for the suggestion… I tried it but it didn’t work either! :pensive: