Hello,
I want to display a pop up message when the quantity is entered on a sales order line if a condition is met. I have the following:
protected virtual void _(Events.FieldUpdated<SOLine, SOLine.orderQty> e)
{
SOLine row = (SOLine)e.Row;
if (row == null) return;
if (row.Qty > 10000)
{
WebDialogResult res = Base.Document.Ask("Warning", "This is a large order", MessageButtons.OK);
}
}
This works, as shown below. I enter a sales order and the message appears.
The problem is that the message also appears when a Sales Quote as converted to a Sales Order.
This makes sense since the SOOrderEntry is used to perform the convertion.
Is there any way to check whether the UI is being used to enter the sales order, or to check which graph has called the SOOrderEntry graph?
Thanks