如何从Acumatica中的Ggraph对象读取数据?

如何从Acumatica中的Ggraph对象读取数据?,acumatica,Acumatica,如何从下面的代码中读取数据?现在我们正在重定向到一个特定的屏幕,但是在重定向之前,我们需要从这个图形对象获取一些值。这是JournalEntry基本图中的示例代码。我试图获取视图名称,但没有成功 IDocGraphCreator creator = GetGraphCreator(doc.Module, doc.BatchType); if (creator != null) { PXGraph graph = creator.Creat

如何从下面的代码中读取数据?现在我们正在重定向到一个特定的屏幕,但是在重定向之前,我们需要从这个图形对象获取一些值。这是JournalEntry基本图中的示例代码。我试图获取视图名称,但没有成功

IDocGraphCreator creator = GetGraphCreator(doc.Module, doc.BatchType);

        if (creator != null)
        {
            PXGraph graph = creator.Create(doc);

            if (graph != null) //how to read data from this object
            {
                throw new PXRedirectRequiredException(graph, true, "")
                {
                    Mode = PXBaseRedirectException.WindowMode.NewWindow
                };
            }
        }

我会使用PXGraph.CreateInstance();创建图形,然后可以在重定向之前进行操作。以下是从CCTransactionHistoryEnq屏幕查看客户的示例

CustomerMaint graph = PXGraph.CreateInstance<CustomerMaint>();
graph.BAccount.Current = graph.BAccount.Search<Customer.bAccountID>(pmInstance.BAccountID);
if (graph.BAccount.Current != null)
{
    throw new PXRedirectRequiredException(graph, true, Messages.ViewCustomer) { Mode = PXBaseRedirectException.WindowMode.NewWindow };
}
customermaintgraph=PXGraph.CreateInstance();
graph.BAccount.Current=graph.BAccount.Search(pmInstance.BAccountID);
if(graph.BAccount.Current!=null)
{
抛出新的PXRedirectRequiredException(graph、true、Messages.ViewCustomer){Mode=PXBaseRedirectException.WindowMode.NewWindow};
}

您应该能够从图表中读取信息,或者以这种方式调用图表上的其他函数。

您好,问题是我们不知道它将重定向到哪个屏幕,例如,我有两个具有相同模块的记录,一个批次将带我到库存收据,另一个批次将带我到库存转移。我的问题是如何知道它将带我到哪个图形。答案将在GetGraphCreator方法中。嗨,Rick,如果可能,请与我共享代码片段。您在CreateInstance中指定的图形是重定向的方向。如果要将其转到库存转移,则应创建INTransferEntry的实例,对于应在ReceiptEntry中使用的库存收据,是否将其用于超链接?如果是这样,您只需在字段中添加一个选择器,并在页面上允许它,它就会自动工作。(以防万一这就是目标)