IRdsDictionaryUpdateExParams.PreserveAccessAttributes

Syntax

PreserveAccessAttributes: Boolean;

Description

The PreserveAccessAttributes property determines whether attribute values, that are in charge of access permissions to MDM dictionary elements, are updated. If the value is True, values of these attributes are not updated in an updated object, default property value is False, and attribute values are updated.

Example

Executing the example requires an MDM repository with the RDS identifier that contains the MDM dictionary Dict_1 in a scheme.

Sub UserProc;
Var
    Mb: IMetabase;
    MU: IMetabaseUpdate;
    Node: IMetabaseUpdateDataObjectNode;
    Object: IMetabaseObject;
    exParams: IMetabaseUpdateObjectExParams;
Begin
    Mb := MetabaseClass.Active;
    MU := Mb.CreateUpdate;
    Object := Mb.ItemByIdNamespace("Dict_1", Mb.ItemById("RDS").Key).Bind;
    Node := MU.RootFolder.Add(MetabaseUpdateNodeType.DataObject) As IMetabaseUpdateDataObjectNode;
    Node.Method := MetabaseUpdateMethod.All;
    exParams := Object.CreateUpdateExParams;
    If exParams Is IRdsDictionaryUpdateExParams Then
        (exParams As IRdsDictionaryUpdateExParams).PreserveAccessAttributes := True;
    End If;
    Node.ExtendedParams := exParams;
    //Update data and metadata
    Node.UpdatePart := MetabaseObjectUpdatePart.DataMetadata;
    //Leave elements that are absent in initial object
    Node.BatchMode := ObjectUpdateDataBatchMode.UpdateInsert;
    Node.Object := Object;
    MU.SaveToFile("C:\temp\Up1.pef");
End Sub UserProc;

After executing the example an update file is created. The MDM dictionary Dict_1 is included in this update. Update of attributes that are in charge of access permissions is disabled for a dictionary.

IRdsDictionaryUpdateExParams