Access Array fields in QueryRange

For a field of type array, like Dimension, if you want to access an individual entry (or called extended field), you can’t directly use dimension[index]. Otherwise you will encounter an error like "Query extended range failure: Right parenthesis expected near pos 0."
Below is an example showing how to access Department in a qurey range.
public void init()
{
     QueryBuildRange qbrDimension;
     ;
 
     super(); 
     
      //Department’s index is 1 
     qbrDimension = this.query().dataSourceNo(1).addRange(
                                          fieldid2ext(fieldNum(myTableName, Dimension), 1));   

     …
}
Advertisements
This entry was posted in Axapta Development. Bookmark the permalink.

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s