Skip to main content
Answer

AddAfterProcessCallback - not available after 2022 R1 upgrade

  • October 11, 2022
  • 3 replies
  • 127 views

Forum|alt.badge.img

After our recent upgrade to 2022 R1 , we can see AddAfterProcessCallback is no longer available. Any suggestions?

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.

 

 

 

3 replies

Shawn Burt
Jr Varsity I
Forum|alt.badge.img+1
  • Jr Varsity I
  • Answer
  • October 17, 2022

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.

 

 

 


Shawn Burt
Jr Varsity I
Forum|alt.badge.img+1
  • Jr Varsity I
  • October 21, 2022

Can I assume that this helped ? 😀


Forum|alt.badge.img
  • Author
  • April 3, 2023

@Shawn Burt , sorry for late response. I’m specifically looking to call the below methods

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...