I have a custom script in sales order, and I try to fetch some data from the customer.
cur_frm.add_fetch(‘customer’,‘tax_id’,‘tax_id’);
If I select the customer in Sales Order, it works.
The problem appears when I create a Quotation, and from the Quotation document I make a Sales Order (with the button). ERPNext autofetches the Customer from the Quotation to the Sales Order. So, the problem is that after that I can not fetch my values that depends in the Customer doctype.
We have tried things like:
Use a setTimeout.
Use a set value (to copy to another field and then copy it again).
Use a frappe call.
Any idea about how to fetch data in a custom script from a server side fetched value?