After our recent upgrade to 2022 R1 , we can see AddAfterProcessCallback is no longer available. Any suggestions?
Best answer by Shawn Burt
View originalAfter our recent upgrade to 2022 R1 , we can see AddAfterProcessCallback is no longer available. Any suggestions?
Best answer by Shawn Burt
View originalthis process has changed a bit.
You need to inherit ARPaymentAfterProcessingManager which in 22R2 is in PX.Objects.Extensions.PaymentTransaction namespace.
create your overrides in this class.
public class MyARPaymentAfterProcessingManager : ARPaymentAfterProcessingManager
{
}
Then you do a GraphExtenstion on ARPaymentEntryPaymentTransaction and override GetAfterProcessingManager.
public class MyARPaymentTransactionExt : PXGraphExtension<ARPaymentEntryPaymentTransaction, ARPaymentEntry>
{
public delegate AfterProcessingManager GetAfterProcessingManagerDelegate();
[PXOverride]
public AfterProcessingManager GetAfterProcessingManager(GetAfterProcessingManagerDelegate baseMethod)
{
baseMethod?.Invoke();
return new MyARPaymentAfterProcessingManager()
{
ReleaseDoc = true,
RaisedVoidForReAuthorization = Base1.RaisedVoidForReAuthorization,
NeedSyncContext = true,
};
}
}
If you need more explanation please let me know.
this is our previous implementation
CCPaymentEntry ccPaymentEntry = new CCPaymentEntry(aProcessingGraph);
aProcessingGraph → this is ARPaymentCCProcessing graph
//ccPaymentEntry.AddAfterProcessCallback(new AfterTranProcDelegate(ARPaymentEntry.PaymentTransaction.UpdateARPaymentAndSetWarning));
//ccPaymentEntry.AddAfterProcessCallback(new AfterTranProcDelegate(PaymentTransactionGraph<ARPaymentCCProcessing, ARPayment>.ReleaseARDocument));
//ccPaymentEntry.AddAfterProcessCallback(new AfterTranProcDelegate(PaymentTransactionGraph<ARPaymentCCProcessing, ARPayment>.CheckForHeldForReviewStatusAfterProc)); not sure how can we do this in the upgraded version...
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.