小编JB9*_*B90的帖子

来自BAccount的PXRedirect - >新SOOrder,收到错误

所以我添加了使用当前BAccount.BAccountID创建新销售订单的操作,我收到此错误"值不能为空.参数名称:密钥".任何人都可以具体看到我做错了什么吗?我假设customerID和BAccountID是等价的,因为它们对ID保持相同的值.

 public PXAction<BAccount> KSSOOrderPush;
    [PXUIField(DisplayName = "Create New Sales Order", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
    [PXButton(CommitChanges = true)]
    protected virtual void kSSOOrderPush()
    {
        //Must use Base.BAccount.Current INSTEAD of BAccount.Current
        BAccount bacct = Base.BAccount.Current;
        if (bacct == null || bacct.BAccountID == null) return;

        //Create instance of graph
        SO.SOOrderEntry graph = PXGraph.CreateInstance<SO.SOOrderEntry>();


        graph.Document.Current = graph.Document.Search<SOOrder.customerID>(bacct.BAccountID);


        throw new PXRedirectRequiredException(graph, "Sales Order");


    }
Run Code Online (Sandbox Code Playgroud)

acumatica

0
推荐指数
1
解决办法
223
查看次数

标签 统计

acumatica ×1