Hi,
I've had a request to remove certain dimensions completely from NAV including historical entries (they have already been used to create ledger entry tables). My preference is to simply stop the user from using them and leave them alone. However, if anyone has a script or a simple way to achieve this then I would like to know.
To all lucky enough to attend Directions in Prague I hope you enjoyed it, I certainly did
, hope to see you in Madrid.
Thanks & Regards
Roddy
Comments
I wouldn't recommend deleting dimensions from Ledger Entry tables. You could block Dimensions or specific Dimension Combinations.
If you don't want dimensions in ledgers you could consider removing respective dimension set ID from Ledgers.
I did something similar process a couple of months ago in NAV2016. My requirement should allow to replace a Dimension Value for other in all database.
The process has two parts:
- Create New set dimension entries if there are not existing (it's on three parts)
1. Fill data that will be affected (to show exactly winch Dimension SetID will be affected)
2. Generate New DimsetID (the page included has a comparasion between original and new preview)
- Propagate them for all database (PropagateDimSetEntry method)
As you can see I'm using Fiedref, Recordref and a Field record filtered by SETRANGE(RelationTableNo,DATABASE::"Dimension Set Entry");
Another check was added to fill physical values
rField2.SETRANGE(RelationTableNo,DATABASE::"Dimension Value");
At the beginning I was only using a report but requirement changed and they asked to me to have a page to manage the process step by step.
Depending on the volume of data process will need more time because RecRef is filtering by a value that it's not normally included on keys...
I hope this code could be useful for you.