Copy custom field from Customer module to sales order module
Hi,
In Customer records we register if the customer has a fixed discount agreement.
We need to copy this field to the sales order, when the sales order is created and the customer is slected.
So, if we select the customer in the sales order, and the address info is coppied into the sales order (this goes automatically) we need the discount to appear as well in the sales order.
I made a function to copy the discount info, but the field is first updated after saving the sales order.
But we need the discount immediately after the customer has been selected.
How can I do that?