Hello everybody,
today I want to show sample of code on overriding Persist method in Acumatica.
Consider following scenario, you need to modify saving logic of screen Purchase Orders in Acumatica. How you can achieve this? Following steps can help you to do this:
- Create extension class for POOrderEntry
- Override Perist method
Both of those details implemented below:
public class POOrderEntryExt : PXGraphExtension<POOrderEntry>
{
[PXOverride]
public void Persist(Action del)
{
//Here you can add some of your code that should be executed before persisting PO Order to database
del();
}
}
With such simple steps you can modify persisting logic to any needed behaviour. Or even turn it off.