Skip to main content

Hello everyone,

The goal is to set a custom field simultaneously when the Shipping information of the Sales Order is populated upon selecting the Customer.

I tried to accomplish this through customization, but unfortunately, I'm unable to locate the correct method name for capturing the moment when the Customer information is integrated into the Sales Order.

Appreciate any assistance!

Hi @marceloquevedo,

Usually I do it in a RowUpdated event handler, but you can try FieldUpdated as well.

protected virtual void _(Events.RowUpdated<SOOrder> e)
{
if (e.Row == null || Equals(e.Row.CustomerID, e.OldRow?.CustomerID)) return;

var rowExt = e.Row.GetExtension<YourSOOrderExtension>();
rowExt.UsrYourField = "value";
}

 


Thank you @Zoltan Febert I think that is exactly what I needed!


Reply