Link: IRdsLinkInstance;
The Link property returns a link with a dictionary, which parameters are necessary to control.
Executing the example requires a form with the btnPLink button, and an MDM repository with the NSI_1 identifier that contains an MDM dictionary with the MAINDICT identifier. The dictionary has an attribute with the PARAM_ATTR identifier that is used to control parameters of the linked dictionary. Add links to the Metabase, Rds and Forms system assemblies.
The example is a handler of the OnClick event for the button.
Sub btnPLinkOnClick(Sender: Object; Args: IMouseEventArgs);
Var
Mb: IMetabase;
Dict: IRdsDictionary;
DictInst: IRdsDictionaryInstance;
ElData: IRdsDictionaryElementData;
Begin
Mb := MetabaseClass.Active;
Dict := Mb.ItemByIdNamespace("MAINDICT", Mb.GetObjectKeyById("NSI_1")).Bind As IRdsDictionary;
DictInst := Dict.Open(Null);
ElData := DictInst.CreateElementData;
ElData.Attribute(Dict.Attributes.FindById("PARAM_ATTR").Key) := 0;
Text := DictInst.Links.Item(0).ParamsControl(ElData).Link.Id;
End Sub btnPLinkOnClick;
After executing the example, the form title displays identifier for the link to the dictionary, which parameters are controlled.
See also: