I've seen a number of examples which show how to find the default financial dimension value given an item's default dimension recid. However, what I need to accomplish is slightly different. Given a financial dimension, I need to get a count of all the items grouped by the financial dimension values. I hope that made sense. Please let me know if I can clarify anything.
Thanks in advance.
can you please describe the whole solution you are looking for? I mean for eg: you want to group customers, vendors, etc. according to default dimension?
Do you have specific financial dimension you want to grouped with? Because if you want to group by the combination of all financial dimensions, then grouping by defaultDimensionRecId would do.
My blog | PBC
This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
I agree with Lee's suggestion.
Also, adding to it, you can use this code to understand how to retrieve the default dimension from the DefaultDimension RecId stored for a vendor. This will help you to group your select statement based on the value retrieved.:
VendTable _VendTable= VendTable::find(’VEND-00001′);
dimStorage = DimensionAttributeValueSetStorage::find(_VendTable.DefaultDimension );
for (i=1 ; i<= dimStorage.elements() ; i++)
info(strFmt(“%1 = %2″, DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name,
Hope this helps solving your problem.
Hello Mriganka / Dominic,
Hopefully this will be enough detail. If I slip on terminology, please excuse me.
I have a default financial dimension on the InventTable which points to a specific dimension 'Product_Category', and these are the only items I'm interested in. Dimension values for Product_Category examples might be B01, B02, etc. What I would like to do is gather all items with a Product_Category default dimension, then group them by values B01, B02, etc. And values is where I would need the count.
Try to modify the example below to get what you want: