How to overrde Authorize CC Payment Action in Acumatica

Hello everybody,

as it was mentioned in one of my previous blog posts, regarding overriding base actions of Acumatica graphs, family of graph extensions grows and grows. 

Today I want to share one more code snipped whic you can use for extending modifing Acumatica actions. Below goes code fragment, which you can use for modification of Authorize CC Payment:

public class PaymentTransactionExt : PXGraphExtension<PaymentTransactionSOOrderEntry>
{
    [PXOverride]
    public virtual IEnumerable AuthorizeCCPayment(PXAdapter adapterFunc<PXAdapterIEnumerablebaseFunc)
    {
        
        var result = baseFunc(adapter);
        
        return result;
    }
}

Of what I foresee now, is a loooooot of work for Acumatica developers upgrading to a newer versions of Acumatica. 

Why I say so? 

Because as usually ISV have their code in SOOrderEntry extensions. But now they either will need to move their code from SOOrderEntry extensions or for example to reference Base1 ( which is your extension ) as well as Base.

Reason why Acumatica does this is probably following few general programming principles of: SRP ( single responsibility principle ), DRY ( Dont Repeat Yourself ) principle, Open Closed principle on graph level, which in long term will bring more stability to the system.

Basic advice will be this, don't expect that upgrade of your code base to 2019 R2 will be as fast, as it used to be in the past, and before giving estimate which you used to give, pay special attention to how new actions are declared.

No Comments

Add a Comment