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

Userlevel 3
Badge +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);
    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 17 June 2022, 17:06

View original

2 replies

Userlevel 3
Badge +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.



Userlevel 7

Thank you for sharing your solution @scottstanaland12 !


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved