web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

To Access controls of one form from another form in MS Dynamics Ax

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Community Member Profile Picture
    on at

    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

  • Community Member Profile Picture
    on at

    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..

  • Community Member Profile Picture
    on at

    Hi,

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

     

    Thanks,

    Yousef Shawareb

     

     

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans