How To Override Buildtaxrequest Method Of Apinvoiceentryexternaltax Class

 

Hello everybody,

today I want to leave a short techy post on how to override method BuildTaxRequest of APInvoiceEntryExternalTax class.

public class APInvoiceEntryExternalTaxExtPXGraphExtension<APInvoiceEntryExternalTaxAPInvoiceEntry>
{
    [PXOverride]
    protected virtual GetTaxRequest BuildTaxRequest(APInvoice invoiceFunc<APInvoiceGetTaxRequestbaseAction)
    {
        var result = baseAction(invoice);
        //Your code
 
        return result;
    }
}

Reason for such a behavior is a fact that class APInvoiceEntryExternalTax is graph extension for graph. That's why such a construction is needed.

How To Override Shoprates Action In Sales Orders Form

 

Hello everybody,

today I want to leave a short post on how to override Shop rates Action in Acumatica. 

I mean this button:

Below goes C# code, with which you can achieve it:

public class SOOrderEntryExt : PXGraphExtension<SOOrderEntry.CarrierRatesSOOrderEntry>
{
    [PXOverride()]
    public virtual IEnumerable ShopRates(PXAdapter adapterFunc<PXAdapterIEnumerablebaseMethod)
    {
        //your code here
        var retVal = baseMethod?.Invoke(adapter);
        //and possibly here
        return retVal;
    }
}

As you can see from the code, life in Acumatica becomes more complex, and if in the past you've used to override directly your actions, now you'll need to create extension for extension in order to override some Actions. 

Similar issues I've seen in other places of SOOrderEntry, for example in AuthorizeCCPayment, CaptureCCPayment, etc.