I would like to change the brand dimension on some released products via a query.
I have noticed the field DimensionValue1
within the Financial Dimension Group
What is the best way to SELECT
this Financial Dimension -> Brand, so i can update the value?
I have tried to follow the relations of the tables, but i can't find the right value.
A released product carries a "DefaultDimension". A defaultdimenson is a unique combination of the financial dimensions used in the current account structure (e.g. Cost Centre, Department, Brand etc.).
To update a single dimension value (brand) in the defaultdimension, I would recommend writing an X++ job.
There are many helper classes available to allow you to do this. DimensionAttributeValueSetStorage, DimensionAttribute, and DimensionAttributeValue are a good place to start. Between the three methods below, you should be able to find/create a new defaultDimension value to store with your Released Product.
DimensionAttributeValueSetStorage::find(defaultDimension);
DimensionAttribute::findByName('Brand');
DimensionAttributeValue::findByDimensionAttributeAndValue( dimensionAttribute, stringValueOfKeyColumn, forUpdateBoolean, createIfReqdBoolean)