Home > Ax Technical > Access the query of a formDatasource in Dynamics Ax

Access the query of a formDatasource in Dynamics Ax

We all know well that to access the datasource in a form we use table name suffixed by DS. But there is one another similar suffix that can help us access the datasource query. See example below to understand.

Eg:

//note the suffix "_q"used to access the query.
InventTable_q.datasourcetable(tablenum(InventTable)).addRange(fieldnum...

This is not widely used but can be of help at times.

Advertisements
  1. June 9, 2010 at 7:09 am

    just to add you can also use “_qr” to use the queryrun instance of the formdatasource

  2. Patrick
    June 7, 2010 at 3:45 pm

    This was new too me. Thanks for recover.

  3. June 5, 2010 at 4:11 am

    Thanks for the comment Daniel. Yeah that can be true. But my feeling says it is matter of getting used too.

  4. Daniel
    June 4, 2010 at 9:44 pm

    Hi!

    It’s true, can be helpful, but could create some confusion in some developers who start wondering where is Inventable_q variable declaration.

    I think it isn’t a good practice, what do you think about it?

    Have a nice weekend!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: