Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

accessing a form method from another form.

Posted on by Microsoft Employee

Hi Everyone, 

 

is it possible to access a form's string Field's method

from another form's string Field's method. 

i need an idea to proceed.Any suggestions are appreciated.

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: accessing a form method from another form.

    Thank you for the quick reply.

  • Crispin John Augustine Profile Picture
    Crispin John Augustine 37,081 on at
    RE: accessing a form method from another form.

    element.args().caller(); can only access the methods under Form>>methods, not the  methods behind design/datasource controls.

  • Crispin John Augustine Profile Picture
    Crispin John Augustine 37,081 on at
    RE: accessing a form method from another form.

    If you move the Code to the table/class, it can be accessed everywhere, easier, and it is a best practice too

  • Verified answer
    Sukrut Parab Profile Picture
    Sukrut Parab 71,647 Moderator on at
    RE: accessing a form method from another form.

    You can access one forms method on another form using object.

    Object myForm = element.args().caller();

    myForm.myMethod(); //Here myMethod is your parent forms method

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,219 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans