Hi,
In the Sales Orders screen, after clicking ‘Add Items’, as shown in the second image below, a client is wanting the Warehouse field to be set to ‘MAIN’ in the dialog box shown in the third image below.
The code I currently have set up doesn’t seem to work. I am using the FieldDefaulting event but would I need to combine this event with another one, like RowSelected, to pass the value through?
Let me know if I can provide any other information.
Kind regards,
Andrew
protected void SOSiteStatusFilter_SiteID_FieldDefaulting(PXCache cache, PXFieldDefaultingEventArgs e)
{
if (e.Row == null) return;
SOSiteStatusFilter row = (SOSiteStatusFilter)e.Row;
INSite site = PXSelectReadonly<INSite, Where<INSite.siteID, Equal<Required<INSite.siteID>>>>.Select(Base, "MAIN");
row.SiteID = site?.SiteID;
}