Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

Passing datasource field information to methods on button on a form

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

  • 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

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,513 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,862 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans