0
votes

Im trying to create a custom processing page within a tab of a custom page. Im working with a custom extension and have the DAC declared in my extension class.

Im unable to set the DataMember of my graph to my PXProcessing object

My processing BLC

public class tableProcess: PXGraph<submittalProcess> { public PXCancel<PX.Objects.PM.ProjectEntry_Extension.ProjectLinesTable> Cancel; public PXProcessing<PX.Objects.PM.ProjectEntry_Extension.ProjectLinesTable, Where<PX.Objects.PM.ProjectEntry_Extension.ProjectLinesTable.contractID, Equal<Current<Contract.contractID>>>> fixtureItems; public submittalProcess()
{ fixtureItems.SetProcessCaption("Approve"); fixtureItems.SetProcessAllCaption("Approve All"); fixtureItems.SetProcessDelegate<ProjectCustom.submittal>(delegate(ProjectCustom.submittal graph, PX.Objects.PM.ProjectEntry_Extension.ProjectLinesTable items) { graph.Clear(); graph.ApproveOrder(items, true); }); } }

Main BLC delcaring actions

public class submittal: PXGraph<submittal,        ProjectEntry_Extension.atcProjectLinesTable>
 {
  public PXSelect<ProjectEntry_Extension.atcProjectLinesTable> Orders;
  public void ApproveOrder(ProjectEntry_Extension.atcProjectLinesTable    order, bool isMassProcess = false)
  {
  Orders.Current = order;

 Orders.Update(order);
 Persist();
if (isMassProcess)
{
PXProcessing.SetInfo(String.Format(
 "Order {0} has been successfully approved.", order.ItemNumber));
}
}


public PXAction<ProjectEntry_Extension.atcProjectLinesTable> Approve;
[PXProcessButton]
[PXUIField(DisplayName = "Approve")]
protected virtual IEnumerable approve(PXAdapter adapter)
{
foreach (ProjectEntry_Extension.atcProjectLinesTable order in    adapter.Get())
{
Actions.PressSave();
PXLongOperation.StartOperation(this, delegate()
{
submittal graph = PXGraph.CreateInstance<submittal>();
graph.ApproveOrder(order);
});
yield return order;
}
}

Ive tried using their namespaces to assign tableProcess.fixtureItems to the grid but its out of its extension class scope.

Is there a way to initialize tableProcess in my ProjectEntry_Extension class?

1

1 Answers

2
votes

Currently Acumatica doesn't allow creation of nested pages within tab of another page. In your case, it would be better to emulate the look and feel of a processing screen inside a tab by declaring selection column and Process/Process All buttons for the processing grid. To launch some process for selected or all records in the processing grid, use static PXLongOperation.StartOperation method as explained in the Implementing Processing Operations section of T200 training course.