私は現在のBAccount.BAccountIDで新しい受注を作成するためのアクションを追加しましたが、このエラー "値はNullではありません。誰でも私が間違ってやっていることを具体的に見ることができますか?私はcustomerIDとBAccountIDが同じIDの値を保持していたため、同等であったと仮定していました。からのPXRedirect BAccount - >新しいSOOrder、受信エラー
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");
}
優れた説明、エラーを指摘していただきありがとうございます、私は推測していないでしょう。あなたが提案したソリューションは完璧に機能しました! – JB90