Notifications
Announcements
No record found.
Hai..
I want to access one form's controls from my form by using X++ codes.
Can i access that another form controls through my form.
*This post is locked for comments
Hi,
Yes you can, now on the first form create a new method put in that method the code you want to excute wheather its actions for specific control on the form or properies for controls and lets call it "PerformAction", now on the second form all you have to do is to type this line of code to perform the method on the first form that will access any controls you want:
element.args().caller().PerformAction();
in this way this code will triger the code in the method on the first form that will contain any event or access property you want.
Thanks,
Yousef Shawareb
thanks... Its working Mr.Yousef Shawareb
But in the case, Can i pass table object as arguments / parameters through this below method,
element.args().Caller().FormActivation(Tablenam TableObj);
Here my purpose is to not touch database directly instead we could pass values through TableObj while multi users use this single form.
Please clear my doubt with simple example..
Of course you can, in the first method you want to pass parameter to add the parameter there so in your case it will be as follow:
void FormActivation(Tablenam TableObj)
{
}
and now on the second form where you want to pass the parameter lets for example assume you want to pass SalesTable, the code will be as follow:
element.args().caller().FormActivation(SalesTable);
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2