Disable editing of specific financial dimensions on form -Microsoft Dynamics Finance and operations(D365FO)
Posted by : Hariharasudan kandaswamy [FormEventHandler(formStr(Custtable), FormEventType:Initialized)] public static void Custtable_OnInitialized(xFormRun _sender, FormEventArgs _e) { DimensionEntryControl dimControl = _sender.design().controlName(identifierStr(DimensionEntryControlTable)); DimensionEnumeration dimensionSetId = DimensionCache:getDimensionAttributeSetForLedger(); DimensionAttributeSetStorage dimensionAttributeSetStorage; DimensionAttribute dimensionAttribute; DimensionAttributeSetItem dimAttrSetItem; const str Department= 'Department'; const str Brand= 'Brand'; dimensionAttributeSetStorage = new DimensionAttributeSetStorage(); while select dimensionAttribute where dimensionAttribute.Name != Department // Exclude specific dimension which should be not editable && dimensio...