Question Status

Suggested Answer
veeru ogu asked a question on 14 Mar 2015 10:28 AM

Hi Folks,

How to pass Financial Dimensions as a Query range ?

Instead of individual id how to pass total array as a range?

can any one provide the syntax for this.

Regards

Veer

Reply
Martin Dráb responded on 14 Mar 2015 10:37 AM

They're are individual fields in database, therefore you'll always end up with individual ranges. I don't know if AX 2009 already have some code for this purpose. If not, writing it by yourself will take just a few minutes.

Martin "Goshoom" Dráb | Freelancer | Goshoom.NET Dev Blog

Reply
veeru ogu responded on 14 Mar 2015 10:56 AM

Thank you very much for your quick response.

Reply
Suggested Answer
Rachit Garg responded on 14 Mar 2015 11:55 PM

Hi Veer,

As Martin explained that in AX2009 each dimension is in individual field. So there is nothing special required to pass range for dimension. These are stored as array so your syntax should be something like this:

queryBuildDataSource.addRange(FieldId2Ext(FieldNum(SalesLine, Dimension),1)).value(queryValue('dimvalue1'));

queryBuildDataSource.addRange(FieldId2Ext(FieldNum(SalesLine, Dimension),2)).value(queryValue('dimvalue2'));

queryBuildDataSource.addRange(FieldId2Ext(FieldNum(SalesLine, Dimension),3)).value(queryValue('dimvalue3'));

Hope this helps.

Thanks,

Rachit Garg

Reply
Suggested Answer
Rachit Garg responded on 14 Mar 2015 11:55 PM

Hi Veer,

As Martin explained that in AX2009 each dimension is in individual field. So there is nothing special required to pass range for dimension. These are stored as array so your syntax should be something like this:

queryBuildDataSource.addRange(FieldId2Ext(FieldNum(SalesLine, Dimension),1)).value(queryValue('dimvalue1'));

queryBuildDataSource.addRange(FieldId2Ext(FieldNum(SalesLine, Dimension),2)).value(queryValue('dimvalue2'));

queryBuildDataSource.addRange(FieldId2Ext(FieldNum(SalesLine, Dimension),3)).value(queryValue('dimvalue3'));

Hope this helps.

Thanks,

Rachit Garg

Reply