Below is the example of using the SetRdsElements operation to move MDM dictionary elements. The request contains key of the element to be moved, key of the element, relative to which the element is moved, and the position, to which the element is moved. The response contains key of the moved element.
{
"SetRdsElements" :
{
"tRds" :
{
"id" : "S1!M!S!N3"
},
"tArg" :
{
"op" : "Update",
"key" :
{
"key" : "564"
},
"moveTo" :
{
"element" :
{
"key" : "563"
},
"relation" : "FirstChild"
}
}
}
}
{
"SetRdsElementsResult" :
{
"id" :
{
"id" : "S1!M!S!N3"
},
"key" :
{
"key" : "564"
}
}
}
public static SetRdsElementsResult MoveRdsElement(RdsId moniker, El[] elements)
{
var somClient = new SomPortTypeClient(); //Proxy object for executing operation
//Operation execution parameters
var tSet = new SetRdsElements()
{
tArg = new SetRdsElementsArg()
{
op = RdsElementOperation.Update,
//Key of moved element
key = new ElKey()
{
key = elements[1].k
},
moveTo = new ElMoveInfo()
{
//Key of element relating to which another element is moved
element = new ElKey() { key = elements[0].k },
relation = TreeRelation.FirstChild
}
},
tRds = moniker
};
//Move element
var tResult = somClient.SetRdsElements(tSet);
return tResult;
}
See also:
SOAP