Hi,
I've written this C/AL code to query dimensions from the database and for each
dimension I query its dimension values. The queries work as expected, I use
'MESSAGE' function to display and test values - it's fine. The problem is that I
need to pass the dimensions and dimension values to a code unit and I'd like to
pass them as objects, instead of arrays of string (using Array .NET interoperability)
- for each specific property I must have different array and it's not practical for me.
So here is my C/AL code, can you give me a piece of advice how to proceed?
FOREACH CurrentDimensionTemp IN DimensionNamesArray DO BEGIN DimensionsQuery.SETFILTER(Code, '=' + CurrentDimensionTemp.ToString()); DimensionsQuery.OPEN(); WHILE DimensionsQuery.READ DO BEGIN DimensionValuesQuery.SETFILTER(Dimension_Code, '=' + DimensionsQuery.Code); DimensionValuesQuery.OPEN(); WHILE DimensionValuesQuery.READ DO BEGIN MESSAGE(DimensionsQuery.Code + ' : ' + DimensionValuesQuery.Code); END; END; END;
Thanks!
*This post is locked for comments