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>();