Hi,
I have added a smart panel to my customized screen. When the customer is selected in the from and clicked on the “Add Purchase” button, all the purchase orders get loaded into the smart panel. Below screenshots for the reference.
Now I need to add selected purchase orders into my customized grid below the form. But my issue is, when I select orders and clicked on “Add & close”, still the grid is empty. Can someone help me with this issue please?
Thank you in advance.
Below is the code for my action, defined in the graph extension which is created when adding the smart panel
public PXAction<APProforma> MyAction;
[PXUIField(DisplayName = "Add Purchase", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
[PXButton(CommitChanges = true)]
public virtual IEnumerable myAction(PXAdapter adapter)
{
if (POrdersView.AskExt() == WebDialogResult.OK)
{
APProformaItemList proforma = Base.APProformaItems.Current;
proforma.LineNbr = 1;
Base.APProformaItems.Update(proforma);
Base.Save.Press();
}
return adapter.Get();
}
For the reference:
APProforma = DAC for the form of the screen (parent DAC)
APProformaItemList : DAC for the grid
APProformaItems : View for the grid
POrdersView : view for the smart panel (POOrder DAC)