Hi, I want to do function which will automatically assing Product Group dimension.
During Item Card creation, after assigning item card number, the system will automatically assign the Product Group dimension – it will be assigned after filling in the Item Category Code on item card.
Can u help me with this? My code is below.
My code:
IF NOT DimensionValue.GET(Dimension.Code, "Item Category Code") THEN BEGIN
DimensionValue.INIT;
DimensionValue.VALIDATE("Dimension Code", Dimension.Code);
DimensionValue.VALIDATE(Code, Rec."Item Category Code");
DimensionValue.INSERT;
END;
Hi, I just recently tested an example of automatically assigning dimensions to customer cards, hopefully the code in the link below can give you some hints.
Thanks.
ZHU
You can also use the UpdateDefaultDim methode in the DimensionManagement codeunit
There are also several other methods in that codeunit to handle default dimensions.
I think that is a better approach than programming an direct insert.
Hi,
Please use Default Dimension table ID - 352, to insert default dimensions while creating new item. It will take below 4 fields values
1. Table ID - 27
2. No. - Your Item No.
3. Dimension Code - your Dimension Code.
4. Dimension Value Code - Your dimension value code.
I hope it will help you.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,524 Super User 2024 Season 2
Martin Dráb 228,441 Most Valuable Professional
nmaenpaa 101,148