Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Passing datasource field information to methods on button on a form

(0) ShareShare
ReportReport
Posted on by 280

Hi all

Running AX 2012 R3 CU9.

I have a business requirement that means I need to have a button on the ActionPane of the SalesTable form. It will run a static method which I've created already. However, the method takes an input variable of a SalesId.

I was hoping to have the button's clicked() method pass the SalesId of the order in question when setting off this method. But I can't work out the X++ syntax to get the SalesTable.SalesId record from within the form.

(I assume "this" returns the form itself)

Any help would be much appreciated


Cheers

Luke

*This post is locked for comments

  • lukbel Profile Picture
    lukbel 280 on at
    RE: Passing datasource field information to methods on button on a form

    Knew it'd be something simple I was missing haha

    Thanks so much for your help!

  • Verified answer
    Agha SirajulDola Profile Picture
    Agha SirajulDola 555 on at
    RE: Passing datasource field information to methods on button on a form

    Hey there,

    in SalesTable form, u can easily have Sales order number by assigning  =SalesTable.SalesId, this will get u current SalesId of selected Control

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,489 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans