Hello everyone,
I have a custom screen with a few tabs, at least one grid on each tab.
I am trying to add a action to the toolbar of one of the grids, ‘Design, Material & Cost’, when I have my PXAction like below, which is the grid’s DAC, it appears but does nothing when run:
public PXAction<NPDDesignMatlCost> CreateInventoryItem;
[PXButton]
[PXUIField(DisplayName = "Create Inventory")]
public virtual IEnumerable createInventoryItem(PXAdapter adapter)
{
PXTrace.WriteInformation("Action ran");
return adapter.Get();
}
When I have PXAction as the main screen DAC, it does not appear at all.
My .aspx is here:
<px:PXGrid runat="server" ID="CstPXGrid32" Caption="Design, Material, Cost" CaptionVisible="True" Height="250px" SkinID="DetailsInTab" Width="100%">
<Levels>
<px:PXGridLevel DataMember="DesignMatlCost" >
<Columns>
<px:PXGridColumn Type="CheckBox" DataField="Selected" Width="60" ></px:PXGridColumn>
<px:PXGridColumn DataField="MatlLineNbr" Width="100px" ></px:PXGridColumn>
<px:PXGridColumn DataField="InventoryID" Width="100px" ></px:PXGridColumn>
<px:PXGridColumn DataField="NonInventoryID" Width="100px" ></px:PXGridColumn>
<px:PXGridColumn DataField="Uom" Width="100px" ></px:PXGridColumn>
<px:PXGridColumn DataField="Quantity" Width="100px" ></px:PXGridColumn>
<px:PXGridColumn DataField="UnitCost" Width="100px" ></px:PXGridColumn>
<px:PXGridColumn DataField="ExtCost" Width="100px" ></px:PXGridColumn>
<px:PXGridColumn DataField="CreatedByID_Creator_displayName" Width="100px" ></px:PXGridColumn>
<px:PXGridColumn DataField="LastModifiedByID_Modifier_displayName" Width="100px" ></px:PXGridColumn></Columns></px:PXGridLevel></Levels>
<ActionBar>
<CustomItems>
<px:PXToolBarButton Text="Create Inventory" CommandName="CreateInventoryItem" CommandSourceID="ds" DependOnGrid="CstPXGrid32">
</px:PXToolBarButton>
</CustomItems>
</ActionBar>
<Mode InitNewRow="True" ></Mode></px:PXGrid>