Acumatica 流程屏幕上的自定义打印发票操作
我正在尝试在新流程屏幕上打印发票操作,该操作指向以客户参考Nbr为参数的新自定义报告。在Acumatica重定向到另一个页面中,有关如何开始此操作的任何帮助都指向新的自定义报告,可以通过抛出重定向异常来完成。要重定向到报告页面,应使用“PXReportRequiredException”异常 用于启动带有参数的自定义报告的代码:Acumatica 流程屏幕上的自定义打印发票操作,acumatica,Acumatica,我正在尝试在新流程屏幕上打印发票操作,该操作指向以客户参考Nbr为参数的新自定义报告。在Acumatica重定向到另一个页面中,有关如何开始此操作的任何帮助都指向新的自定义报告,可以通过抛出重定向异常来完成。要重定向到报告页面,应使用“PXReportRequiredException”异常 用于启动带有参数的自定义报告的代码: public PXAction<Customer> printInvoice; [PXUIField(DisplayName = "Pri
public PXAction<Customer> printInvoice;
[PXUIField(DisplayName = "Print Invoice", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
public virtual IEnumerable PrintInvoice(PXAdapter adapter)
{
Customer customer = [fetch desired customer record here];
if (customer != null && customer.RefNbr != null)
{
// Add your report parameters to a Dictionary<string, string> collection.
// The dictionary key is the parameter name as shown in the report editor.
// The dictionary value is the value you assign to that parameter.
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters["RefNbr"] = customer.RefNbr;
// Provide your custom report ReportID
string reportID = "AR641000";
// Provide a title name for your report page
string reportName = "Customer Invoice"
// Redirect to report page by throwing a PXReportRequiredException object
throw new PXReportRequiredException(parameters, reportID, reportName);
}
return adapter.Get();
}
您可以在Acumatica报表设计器的“架构生成器”对话框的“参数”选项卡中查找参数名称: