In version 2022 R2 the source code has the following for a button on the grid section of the Sales Orders screen, with the command "AddInvBySite".
<CustomItems>
<px:PXToolBarButton Text="Add Items" Key="cmdASI">
<AutoCallBack Command="AddInvBySite" Target="ds">
<Behavior CommitChanges="True" PostData="Page" />
</AutoCallBack>
</px:PXToolBarButton>
And here's the source code, easily findable:
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();
}
I'm upgrading to 2024 R1, and I see the same button ("Add Items") - with a different command, "ShowItems". The problem is, I can't find this action / command anywhere in the source code / BLC for that page...
<CustomItems>
<px:PXToolBarButton Text="Add Items" Key="cmdASI">
<AutoCallBack Command="ShowItems" Target="ds">
<Behavior CommitChanges="True" PostData="Page" />
</AutoCallBack>
</px:PXToolBarButton>
Any idea where I can find that 'ShowItems' command?
That method is part of the PX.Objects.Extensions.AddItemLookup.AddItemLookupBaseExt<TGraph, TDocument, TItemInfo, TItemFilter>
abstract graph extension.
It is implemented by PX.Objects.SO.GraphExtensions.SOOrderEntryExt.SOOrderSiteStatusLookupExt
for SOOrderEntry
.