Skip to main content
Solved

Cannot reference custom Action in process form


Forum|alt.badge.img

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

Best answer by edwardmcgovern97

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

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img

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


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2771 replies
  • July 28, 2023

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings