Loading ...

How To Override Base Event In Acumatica

Hello everybody,

Imagine following scenario. You have some code in base class, which you need to change. How to do it. For this purpose you can use PXOverride attribute.

See the following code:

public class YourExtension : PXGraphExtension<SomeBasicGraph>
{
   [PXOverride]
   public void MethodForOverriding(string viewName, IEnumerable items)
   {
      // Method body
   }
}

In case which is presented MethodForOverriding of base class will be called. If you want to avoid it, you can add additional argument to the code, and then manipulate how to call it or even omit calling of method from base logic. Look at the following code:

public class YourExtension : PXGraphExtension<SomeBasicGraph>
{
[PXOverride]
public void MethodForOverriding(string viewName, IDictionary keys, IDictionary values, Func<string, IDictionary, IDictionary, int> methodDel)
{
   //some your code
   int res = methodDel(viewName, keys, values);
   //again some of your code. For example you can modify res.
   return res;
}
}

Ready to take your Acumatica customization to the next level? Whether you need to override base methods, extend functionality, or create tailored solutions for your business, our team is here to help. If you have a specific customization request or need expert guidance on implementing advanced features like the PXOverride attribute, leave us a request today! Let’s transform your Acumatica experience together—your unique business needs deserve unique solutions. Submit your customization request now and let’s build something extraordinary!

Be the first to rate this post

  • Currently 0.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5