Skip to main content
Solved

AddAfterProcessCallback - not available after 2022 R1 upgrade


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.

 

 

 

View original
Did this topic help you find an answer to your question?

3 replies

Shawn Burt
Jr Varsity I
Forum|alt.badge.img+1
  • Jr Varsity I
  • 109 replies
  • 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
  • 109 replies
  • October 21, 2022

Can I assume that this helped ? šŸ˜€


Forum|alt.badge.img
  • Author
  • 69 replies
  • 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...


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings