I have a couple of methods that I will need to use them in multiple graphs. These methods work if I pass them specific Graph, View … but the problem is I have to copy these methods into any screen I need them (currently in 6 places). For example assume I’m doing the exact same thing on APInvoice (APInvoiceEntry) and POOrder (POOrderEntry).
If I copy my methods into these graph extensions, I can declare APInvoiceEntry and APInvoice as my method input parameters and pass to my methods then from inside my methods I will have access to the internal objects of them. For example I can access to the Base Graph Viewes or Actions. The same goes to POOrderEntry and other graphs. The problem is I have repeated my codes six times and any improvement and bug fix should happen in six different places.
Ideally I would like to convert my methods to generic methods that I can pass any desired Graph and DAC and access to their dependent objects like as views and actions. It could be done through Reflection but I’m hoping Acumatica has some built in classes or methods that can be utlized.