SyncCopiedElements: Boolean;
The SyncCopiedElements property determines whether composite MDM dictionary elements are synchronized with the elements copied from data sources.
Property value can be set only when creating a new composite MDM dictionary.
Available values:
True. Synchronize the copied elements in the composite dictionary with elements from its data sources.
False. Default value. Do not synchronize composite dictionary elements.
Executing the example requires that the repository contains two MDM dictionaries with the RDS1 and RDS2 identifiers. A default database is set in the repository.
Add links to the Db, Metabase, Rds system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
CrInfo: IMetabaseObjectCreateInfo;
RdsCompDict: IRdsCompoundDictionary;
Sources: IRdsCompoundDictionarySources;
Source: IRdsCompoundDictionarySource;
Begin
Mb := MetabaseClass.Active;
CrInfo := Mb.CreateCreateInfo;
CrInfo.ClassId := MetabaseObjectClass.KE_CLASS_METADICTIONARYCOMPRDS;
CrInfo.Name := "Composite MDM dictionary (synchronization with sources)";
CrInfo.Id := Mb.GenerateId("COMPOUND_RDS");
CrInfo.Parent := Mb.Root;
CrInfo.KeepEdit := True;
RdsCompDict := Mb.CreateObject(CrInfo) As IRdsCompoundDictionary;
RdsCompDict.Database := Mb.SpecialObject(MetabaseSpecialObject.DefaultDatabase).Bind As IDatabase;
// Enable synchronization of copied elements
RdsCompDict.SyncCopiedElements := True;
// Add two data sources for composite MDM dictionary
Sources := RdsCompDict.Sources;
Source := Sources.Add;
Source.Id := "COMPOUNDDICTIONARYSOURCE1";
Source.Name := "Source 1";
Source.Source := Mb.ItemById("RDS1").Bind As IRdsDictionary;
Source := Sources.Add;
Source.Id := "COMPOUNDDICTIONARYSOURCE2";
Source.Name := "Source 2";
Source.Source := Mb.ItemById("RDS2").Bind As IRdsDictionary;
// Save changes
(RdsCompDict As IMetabaseObject).Save;
End Sub UserProc;
After executing the example a new composite MDM dictionary is created in the repository. Synchronization of copied elements is enabled in the dictionary, and two data sources are added.
See also: