I want to obtain the same result as this select:
select localSalesLine
where localSalesLine.Dimension[3] == "xyz";
My query is like this one:
q = new query();
qbds = q.addDataSource(tablenum(SalesLine));
qbds.addRange(fieldnum(SalesLine, Dimension)).value("xyz");
qr = new queryRun(q);
but in this case i can't filter the third dimension's field
Any idea?
Thanks to all....bye!
Alex
you can use for container field :
declare queryBuildRange like "DimensionRange", then in your query use this:
dimensionRange =
this.query().dataSourceTable(TableNum(SalesLine)).addRange(FieldId2Ext(FieldNum(SalesLine, Dimension),3));
use 3 for the third field of dimension.
then affect a value :
dimensionRange.value("you value");
hope that will help you.
a+
Dimension type fields are not container, but array type field.
--
Kashperuk Ivan (Vanya), Dynamics AX MCBMSS
My blog - http://kashperuk.blogspot.com
MorphX IT in Russian - http://www.lulu.com/content/723888
You would have to add another Company field to the Dimensions table, and
filter based on the curExt() on this column.
Or even add a separate table to set up the links of dimensions to companies.
But, honestly, I did not understand the problem. If you don't want companies
to see dimensions that don't belong to them, take the Dimensions table out of
the table collection, so that each company uses there own set of rows in this
table. Or is it not possible due to some other reasons?
--
Kashperuk Ivan (Vanya), Dynamics AX MCBMSS
My blog - http://kashperuk.blogspot.com
MorphX IT in Russian - http://www.lulu.com/content/723888
We have a total of 7 Dimensions. All are set up in a virtual table and
shared with all theother companies. That works great where we want all the
companies to share all the data in the dimention. For example we all use the
same universe of product codes. Sot that is desired that all the codes in
the dimension are shared.
Then we have other dimenstions like Job # and responsibility center
(functional groups) that are of a unique code structure and should only be
used by that local company. One company does not need to see all the jobs of
another company. We need to filter only those local jobs. Idealy it would
be great if that dimension were local rather than virtual.
We also have a second problem of bringing in transactional data from various
operational systems into each company. One of the dimensions is job# and we
need to have that job automatically inserted into the dimension so the full
transacitions can be imported. The issue is that the transaction cannot be
imported via the integration sofware and AIF becasue the job has not first
been populated into the dimension.
Thanks for your help
Quay