HasDefaultElement: Boolean;
The HasDefaultElement method determines whether there is a default element in MDM dictionary.
Available values:
False. A default element is not set in the dictionary.
True. A default element is set in the dictionary.
Executing the example requires that the repository contains an MDM dictionary with the RDS_DICT_OBJ identifier and with specified default element.
Add links to the Metabase, Rds system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Obj: IMetabaseObject;
Dict: IRdsDictionary;
Begin
// Get current repository
MB := MetabaseClass.Active;
// Get MDM dictionary
Obj := MB.ItemById("RDS_DICT_OBJ").Edit;
Dict := Obj As IRdsDictionary;
// Check if there is default element
Debug.WriteLine(Dict.HasDefaultElement.ToString);
// Delete setting default element
Dict.ResetDefaultElement;
// Save dictionary
Obj.Save;
End Sub UserProc;
After executing the example the console window displays information about default element specified in the dictionary, and element setting is deleted.
See also: