这是我的流程屏幕: 正如您所看到的那样,它会引发错误,但它并不表示网格上的错误标记。 点击进程按钮后,它只是取消选中在我的记录复选框PXProcessing SetError不在UI界面中显示
我想网格是这样(用红色的“X”标记):
这是我的图:
public PXCancel<PayrollFilter> Cancel;
public PXSetup<PayrollSetup> PayrollSetup;
public PXFilter<PayrollFilter> Filter;
[PXFilterable]
public PXFilteredProcessingJoin<PayrollEmployeeProcess, PayrollFilter,
InnerJoin<EPEmployee,
On<PayrollEmployee.employeeID, Equal<EPEmployee.bAccountID>>,
InnerJoin<Branch,
On<EPEmployee.parentBAccountID, Equal<Branch.bAccountID>>>>,
Where<PayrollEmployee.payPeriodID, Equal<Current<PayrollFilter.payPeriodID>>,
And<Branch.branchID, Equal<Current<AccessInfo.branchID>>>>> EmployeePayrollProcess;
#region Constructor
public PayrollProcess()
{
PayrollSetup setup = PayrollSetup.Current;
EmployeePayrollProcess.SetSelected<PayrollEmployeeProcess.selected>();
EmployeePayrollProcess.SetProcessDelegate(delegate (List<PayrollEmployeeProcess> employees)
{
if (Filter.Current == null) return;
var payPeriod = Filter.Current.PayPeriodID ?? 0;
var payrollPeriod = Filter.Current.PayrollPeriodID ?? 0;
if (payPeriod == 0 || payrollPeriod == 0) return;
PXLongOperation.StartOperation(this, delegate()
{
bool errorOccured = false;
foreach (PayrollEmployeeProcess employee in employees)
{
PayrollRegisterEntry graph = PXGraph.CreateInstance<PayrollRegisterEntry>();
try
{
graph.ProcessPayroll(employee, payPeriod, payrollPeriod);
PXProcessing<PayrollEmployeeProcess>.SetInfo("Employee processed");
}
catch (Exception ex)
{
errorOccured = true;
//employees.IndexOf(employee),
PXProcessing<PayrollEmployeeProcess>.SetError(ex);
}
finally
{
graph.Clear();
}
}
if (errorOccured) throw new PXException("At least one employee was not processed.");
});
});
// EmployeePayrollProcess.
}`
任何人都可以帮助我吗?我正在使用Acumatica 6
有可能是在页面的一些BATCHUPDATE设置和我通常看到处理页面上的记录处理调用静态方法作为处理调用,这有助于我在过去解决一些问题。 – Brendan
我应该在网格设置上使用BatchUpdate吗?我已经设置了SyncPosition设置 –
我总是使用release IN文档作为我在处理页面中的示例。 (Page IN501000/Graph INDocumentRelease)。它使用BatchUpdate =“true”。请注意,该进程调用名为ReleaseDoc的静态方法。尝试实现类似的东西。我也遇到了传入静态调用的对象的问题。它有点挑剔,让处理图标显示,但使用此图作为例子,你应该能够得到它的工作 – Brendan