在 Acumatica 中打开指定的报告和页面

Open specified report and page in Acumatica

在 Acumatica 中有异常 PXRedirectRequiredException 允许重定向到 Acumatica 中的另一个页面。是否可以打开报告和申请页面?

您可以使用 PXRedirectWithReportException。这是 AssetMaint 的代码示例:

    AssetTranRelease graph = CreateInstance<AssetTranRelease>();
    AssetTranRelease.ReleaseFilter filter = (AssetTranRelease.ReleaseFilter)         
    graph.Filter.Cache.CreateCopy(graph.Filter.Current);
    filter.Origin = FARegister.origin.Disposal;
    graph.Filter.Update(filter);
    graph.SelectTimeStamp();
    int i = 0;
    Dictionary<string, string> parameters = new Dictionary<string, string>();
          foreach (FARegister register in created)
          {
             register.Selected = true;
             graph.FADocumentList.Update(register);
             graph.FADocumentList.Cache.SetStatus(register, 
             PXEntryStatus.Updated);
                    graph.FADocumentList.Cache.IsDirty = false;
                    parameters["FARegister.RefNbr" + i] = register.RefNbr;
                    i++;
                }

                parameters["DateFrom"] = null;
                parameters["DateTo"] = null;

                PXReportRequiredException reportex = new 
                PXReportRequiredException(parameters, "FA680010", "Preview");
                throw new PXRedirectWithReportException(graph, reportex, 
                              "Release FA Transaction");