我尝试在自定义页面的标签页面中创建自定义处理页面。我正在使用自定义扩展,并在我的扩展类中声明了DAC。
我无法将我的图表的DataMember设置为我的PXProcessing对象
我的处理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);
});
}
}
主要BLC执行行动
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;
}
}
我尝试使用他们的命名空间将tableProcess.fixtureItems分配给网格,但是它超出了它的扩展类范围。
有没有办法在ProjectEntry_Extension类中初始化tableProcess?
答案 0 :(得分:2)
目前Acumatica不允许在另一个页面的选项卡中创建嵌套页面。在您的情况下,最好通过声明选择列和处理网格的Process / Process All按钮来模拟选项卡内处理屏幕的外观。要为处理网格中的选定或所有记录启动某个流程,请使用静态PXLongOperation.StartOperation
方法,如 T200 培训课程的实施处理操作部分所述。< / p>