CurDate: DateTime;
The CurDate property determines a value of a system parameter, that is, Relevance Date.
Executing the example requires the MDM repository NSI_1 that contains an MDM dictionary with the Dict_1 identifier.There is a possibility to change elements by time in a dictionary.
Sub Main;
Var
MB: IMetabase;
ParamsVal: IRdsParamValues;
Dict: IRdsDictionary;
DictInst: IRdsDictionaryInstance;
Elements: IRdsDictionaryElements;
Element: IRdsDictionaryElement;
i: Integer;
Begin
MB := MetabaseClass.Active;
Dict := MB.ItemByIdNamespace("DICT_1", MB.ItemById("NSI_1").Key).Bind As IRdsDictionary;
ParamsVal := Dict.Params.CreateValues;
ParamsVal.CurDate := DateTime.ComposeDay(2010, 1, 1);
DictInst := Dict.Open(ParamsVal);
Elements := DictInst.Elements;
For i := 0 To Elements.Count - 1 Do
Element := Elements.Item(i);
Debug.WriteLine(Element.Name);
End For;
End Sub Main;
After executing the example an object that controls parameter values is created. With a specified value of relevant date a dictionary is opened, and values of the Name attribute are displayed in the console for all received dictionary elements.
See also: