Hi,
I am trying to write a custom code to default warehouse on each item based on user (In future would like to change it to a more complex quantity logic). Using the below code:
frappe.ui.form.on("Sales Order Item", {
refresh: function(frm) {
// use the __islocal value of doc, to check if the doc is saved or not
if(user=="xxxx@gmail.com" && frm.doc.__islocal){
frm.doc.warehouse = "ABC";}
if(user=="xxxx1@gmail.com" && frm.doc.__islocal){
frm.doc.warehouse = "DEF";}
}
});
I am very new to coding and am using online help to get through.
This one doesnt seem to work.
Any suggestions around this would really be helpful.
Thanks
Nitin