Reputation: 909
I have a custom process for the Sales Order screen that populates the Details grid with values obtained from another table/DAC. The problem is that I need to save the record, which will create an Order Nbr, before the process runs. I've tried to add this code to the process method as follows:
protected virtual IEnumerable licensePlateLoad(PXAdapter adapter)
{
//Issue a save first...
Base.Actions.PressSave();
//Declare the grid's DAC...
SOLine soline;
PXLongOperation.StartOperation(Base, delegate ()
{
//...process code here...
});
I've also tried to use Base.Persist() in the same spot as Base.Actions.PressSave(), but neither of these actions create the new record before running the process. Any ideas?
Upvotes: 0
Views: 227
Reputation: 771
Try passing the adapter from the action into the .PressSave() method
So Base.Actions.PressSave(adapter);
Upvotes: 1