Solved

Cannot reference custom Action in process form

  • 28 July 2023
  • 2 replies
  • 37 views

Userlevel 3
Badge

Modified the Customer Screen and one of the mods was to add a custom action button to calculate some custom fields.   The button and fields work perfectly.  But now I am trying to Add a custom process screen to allow us to run those buttons for all customers on a schedule. 

First I could not reference the Extension I created in the Process Form definition: 

It only accepted: 

customers.SetProcessDelegate<CustomerMaint>(
        delegate (CustomerMaint graph, Customer templat)
        {

Instead of : 

customers.SetProcessDelegate<CustomerMaint_Extension>(
        delegate (CustomerMaint_Extension graph, Customer templat)
        {

So naturally when it cam time to call the custom button it would not work: 

graph.Clear();
 graph.processon_extension(templat);

there was no processon_extension() available under the graph because the graph could only be CustomerMaint not CustomerMain_Extension. 

How do I reference an Action on an Extension of a form in a Process screen which I think can only be referencing a main form, not the extensions. 

Thanks in advance

icon

Best answer by edwardmcgovern97 28 July 2023, 17:44

View original

2 replies

Userlevel 3
Badge

Sorry I just realized I can reference the _extension of the form by: 

var graphext = graph.GetExtension<CustomerMaint_Extension>();

Using the GetExtension<name of extension> method

Userlevel 7
Badge

Thank you for sharing your solution with the community @edwardmcgovern97!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved