Hi @rashmikamudalinayake10 ,
You can find the this logic under the below graph extension, if you are using 24 R1.
PX.Objects.Extensions.AddItemLookup.AddItemLookupBaseExt<TGraph, TDocument, TItemInfo, TItemFilter>
abstract graph extension. It is implemented by PX.Objects.SO.GraphExtensions.SOOrderEntryExt.SOOrderSiteStatusLookupExt
for SOOrderEntry
For previous versions, there is an action button command you can easily find in Aspx file.
<CustomItems>
<px:PXToolBarButton Text="Add Items" Key="cmdASI">
<AutoCallBack Command="AddInvBySite" Target="ds">
<Behavior CommitChanges="True" PostData="Page" />
</AutoCallBack>
</px:PXToolBarButton>
And here is the source code for that action command.
public PXAction<SOOrder> addInvBySite;
[PXUIField(DisplayName = "Add Items", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
[PXLookupButton]
public virtual IEnumerable AddInvBySite(PXAdapter adapter)
{
if (sitestatus.AskExt((PXGraph g, string viewName) => sitestatusfilter.Cache.Clear()) == WebDialogResult.OK)
{
return AddInvSelBySite(adapter);
}
sitestatusfilter.Cache.Clear();
sitestatus.Cache.Clear();
return adapter.Get();
}
Hope, it helps!