If I do frm.doc.customer, it prints the customer name. But if I do like the code above, the message box does not show up at all. It seems that I can’t get any fields from the Customer object using the syntax above. What is the correct way of getting fields from an object contained in a document?
In your above code use -
frm.doc.fieldname , to access particular field from current form.
But there is no field like customer.customer_name.
Just use frm.doc.customer or frm.doc.customer_name
Ok…I resolved it. So it seems like the customer field in the delivery note is not an object reference. So we cannot do something like frm.doc.customer.customer_name. We should instead do: