web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Cannot find the definition for the datasource variable

(0) ShareShare
ReportReport
Posted on by

Hi There,

I'm learning the Dynamics AX 2012 programming at the moment, suppose i drag a Table(MainAccount) to the Form's datasources.

i can reference the dataTable in the X++ codes by using "MainAccount_ds", or the query like this "MainAccount_q". from my point of view, there are pre-defined object reference for the datasource.

Where i can find all the pre-defined variables for the datasource ?

many thanks.

*This post is locked for comments

I have the same question (0)
  • dolee Profile Picture
    11,279 on at

    Hi,

    Interesting, I didn't know about myTable_q.

    Nonetheless, the two important ones would be myTable and myTable_ds. As mentioned here msdn.microsoft.com/.../aa636676.aspx

    Then you can use the datasource methods to do other things, like myTable_ds.query() to get the query.

    P.S. No, I haven't seen any reference for a list of the references you looking for.

  • Verified answer
    Community Member Profile Picture
    on at

    you can find all the system pre-defined variables for the datasource and form object

    if you put a breakpoint in init() method of the form and look into variable windows in debugger

    where as for datasource we have

    TableName_ds - datasource object

    TableName_q - datasource query object

    TableName_QR - Datasource queryRun object

    Please verify and update if this information helps you.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans