Solved

Call action from instance form (child) the action is in form(father)

  • 16 February 2023
  • 5 replies
  • 47 views

Hello

 

I was create an instance of form, and I want call an acction of the principal 

icon

Best answer by Django 16 February 2023, 17:48

View original

5 replies

Userlevel 7
Badge +5

You could pass the father graph to a public variable in the child. That would allow the child to invoke the father’s action. There might be a more elegant way to do that.

ChildGraph child = PXGraph.CreateInstance<ChildGraph>();
child.myFather = this;
child.myFather.fatherAction();

 

Badge +11

We're developers. We can talk about what we want to do, but if we're going to solve a problem, we either need code or screenshots 🙂

You could pass the father graph to a public variable in the child. That would allow the child to invoke the father’s action. There might be a more elegant way to do that.

ChildGraph child = PXGraph.CreateInstance<ChildGraph>();
child.myFather = this;
child.myFather.fatherAction();

 

Thanks 

 

but I reviewed there isn’t not exist property myFather

 

Userlevel 7
Badge +5

As Daryl mentioned, we’re going to need more information about what you’re attempting to do. What screens and graphs are you working with?

 

I want call method in the father 

the method would do the following: base.Base.Activities.View.RequestRefresh();

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