After our recent upgrade to 2022 R1 , we can see AddAfterProcessCallback is no longer available. Any suggestions?
Solved
AddAfterProcessCallback - not available after 2022 R1 upgrade
Best answer by Shawn Burt
this 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.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.