Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

accessing a form method from another form.

(0) ShareShare
ReportReport
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,656 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!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans