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

时间:2015-05-15 10:35:06

标签: erp acumatica

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

1 个答案:

答案 0 :(得分:1)

您可以使用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");