on 04-25-2022 08:41 AM - edited on 09-28-2023 05:56 AM by JackLacava
This snippet will rename a dimension.
Note: RenameDim does not create entries in Audit tables, which means the Audit Metadata report will not contain anything related to this operation. For this reason, we do not recommend to use this snippet outside of implementation activities or in production environments.
Note: renaming a dimension might break references in exported artefacts.
Dim originalDim As String = "Original Dimension Name" '<-- Dimension name to be changed
Dim updatedDim As String = "New Dimension Name" '<-- Updated Dimension name
Dim objDimPk As DimPk = BRApi.Finance.Dim.GetDimPk(si, originalDim)
BRApi.Finance.Dim.RenameDim(si, objDimPk, originalDim, updatedDim)