IMetabaseUpdateDataObjectNode.ReferenceConstraintsHandling

Syntax

ReferenceConstraintsHandling: UpdateDataConstraintsHandlingType;

Description

The ReferenceConstraintsHandling property determines a method for handling integrity constraint of updated object elements.

Comments

This property is relevant for the update of MDM dictionaries, which elements may have the links from other dictionaries.

Example

Executing the example requires an MDM dictionary with the Dict_1 identifier.

Sub UserProc;
Var
    MB: IMetabase;
    MDesc: IMetabaseObjectDescriptor;
    MUpdate: IMetabaseUpdate;
    ObjNode: IMetabaseUpdateDataObjectNode;
Begin
    MB := MetabaseClass.Active;
    // Dictionary to be updated
    MDesc := MB.ItemById("Dict_1");
    MUpdate := MB.CreateUpdate;
    ObjNode := MUpdate.RootFolder.Add(MetabaseUpdateNodeType.DataObject) As IMetabaseUpdateDataObjectNode;
    ObjNode.Label := MDesc.Id;
    ObjNode.Method := MetabaseUpdateMethod.All;
    ObjNode.Object := MDesc;
    ObjNode.ReferenceConstraintsHandling := UpdateDataConstraintsHandlingType.Ask;
    MUpdate.SaveToFileNF("c:\NSIDictionary.pefx");
End Sub UserProc;

After executing the example a new update is created. The MDM dictionary is included in this update. In case there are links from others dictionaries to the destination dictionary elements that are absent in the update, when the dictionary elements are updated the dialog box with the selection of further operations opens.

See also:

IMetabaseUpdateDataObjectNode