Skip to main content
Solved

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

  • February 16, 2023
  • 5 replies
  • 47 views

Hello

 

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

Best answer by Django

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();

 

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

5 replies

Forum|alt.badge.img+6
  • Captain II
  • 550 replies
  • Answer
  • February 16, 2023

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();

 


darylbowman
Captain II
Forum|alt.badge.img+13

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 🙂


  • Author
  • Freshman I
  • 6 replies
  • February 17, 2023
Django wrote:

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

 


Forum|alt.badge.img+6
  • Captain II
  • 550 replies
  • February 17, 2023

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?


  • Author
  • Freshman I
  • 6 replies
  • February 17, 2023

 

I want call method in the father 

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


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