Solved

How to do this ,On Selector of Inventory ID list button,It should fiter data according to Inventory Id (Multiselector ) that filtered data should be visible on grid.

  • 19 September 2023
  • 2 replies
  • 83 views

Example one base screen is available in acumatica screenID: SO503050 & graph name: SOPickingWorksheetProcess for List button

icon

Best answer by sweta68 20 September 2023, 07:58

View original

2 replies

 

Userlevel 7
Badge +10

Hi @mayurig23 ,

Kindly find below code snippet. I have not implemented it at my end but I believe it works for you.

#region Views
[PXVirtualDAC]
[PXImport(typeof(HeaderFilter))]
public PXSelect<InventoryLinkFilter> SelectedItems;
public IEnumerable selectedItems() => SelectedItems.Cache.Cached.Cast<InventoryLinkFilter>().Where(t => SelectedItems.Cache.GetStatus(t) != PXEntryStatus.Deleted).ToArray();

#endregion

#region Actions
[PXButton, PXUIField(DisplayName = "List")]
public virtual void selectItems() => SelectedItems.AskExt();
public PXAction<HeaderFilter> SelectItems;
#Endregion

and call this action in aspx as well to the button as below.


<CallbackCommands>
<px:PXDSCallbackCommand Visible="false" Name="SelectItems" CommitChanges="true" />
</CallbackCommands>

<px:PXButton runat="server" ID="btnItemList" Text="List" CommandName="SelectItems" CommandSourceID="ds"></px:PXButton>



<%-- Inventory Item List Dialog --%>
<px:PXSmartPanel ID="InventoryItemListDialog" runat="server" Caption="Inventory Item List" CaptionVisible="True" Key="selectedItems" LoadOnDemand="True" AutoRepaint="True">
<px:PXGrid ID="gridItemList" runat="server" DataSourceID="ds" SkinID="Details" SyncPosition="True">
<Levels>
<px:PXGridLevel DataMember="selectedItems">
<Columns>
<px:PXGridColumn DataField="InventoryID" />
<px:PXGridColumn DataField="Descr" />
</Columns>
<RowTemplate>
<px:PXSegmentMask ID="iidInventoryID" runat="server" DataField="InventoryID" CommitChanges="True" />
</RowTemplate>
<Layout ColumnsMenu="False" />
</px:PXGridLevel>
</Levels>
<AutoSize Enabled="True" MinHeight="300" />
<Mode AllowAddNew="True" AllowDelete="True" AllowUpdate="True" AllowUpload="True" AllowFormEdit="False" />
</px:PXGrid>
</px:PXSmartPanel>

Hope, it helps!

Regards,

Sweta

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved