Skip to main content
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 282

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

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Kempeth Profile Picture

Kempeth 4

#1
Andy Adamak Profile Picture

Andy Adamak 4

#1
Community Member Profile Picture

Community Member 4

Featured topics

Product updates

Dynamics 365 release plans