Skip to main content
Solved

Issue with Customer Contract customization on upgrade from 2020 R2 to 2022 R1


Forum|alt.badge.img+1

Trying to convert the code below for the 2022 R1 release.  The PX.Objects.CT.CTBillEngine.ARContractInvoiceEntry graph has been removed, but I cannot find what it should be replaced with.

The code is updating some custom fields on the Invoice generated from the Run Contract Billing action.

    public delegate void BillDelegate(Nullable<Int32> contractID, Nullable<DateTime> date);
    [PXOverride]
    public void Bill(Nullable<Int32> contractID, Nullable<DateTime> date, BillDelegate baseMethod)
    {
        PXGraph.InstanceCreated.AddHandler<PX.Objects.CT.CTBillEngine.ARContractInvoiceEntry>((graph) =>          
        {
            graph.RowInserted.AddHandler<ARInvoice>((sender, e) =>
            {
                ARInvoice inv = (ARInvoice)e.Row;
                
                 // pull value from custom UsrCustPO field
                 Contract ContractRow = Contract.PK.Find(Base, contractID);

                 // extension name:  ContractExt
                 ContractExt ext = ContractRow.GetExtension<ContractExt>();  
   


 

Best answer by scottstanaland12

I finally found the solution to this.  I replaced the references to PX.Objects.CT.CTBillEngine.ARContractInvoiceEntry with just an a reference to the normal ARInvoiceEntry graph.

 

Scott

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

2 replies

Forum|alt.badge.img+1

I finally found the solution to this.  I replaced the references to PX.Objects.CT.CTBillEngine.ARContractInvoiceEntry with just an a reference to the normal ARInvoiceEntry graph.

 

Scott


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2650 replies
  • June 17, 2022

Thank you for sharing your solution @scottstanaland12 !


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