Below is the example of using the SetRdsElements operation to update information about an MDM dictionary element. The request contains element key and new information about it. The response contains key of the element, for which the operation was executed.
{
"SetRdsElements" :
{
"tRds" :
{
"id" : "S1!M!S!N5"
},
"tArg" :
{
"op" : "Update",
"key" :
{
"key" : "3"
},
"data" :
{
"n" : "New name",
"k" : "3",
"h" : "false",
"o" : "0"
}
}
}
}
{
"SetRdsElementsResult" :
{
"id" :
{
"id" : "S1!M!S!N5"
},
"key" :
{
"key" : "3"
}
}
}
public static SetRdsElementsResult UpdateRdsElementInfo(RdsId moniker, string elementKey, string newElementName)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
//Operation execution parameters
var tSet = new SetRdsElements()
{
tArg = new SetRdsElementsArg()
{
op = RdsElementOperation.Update,
//Key of element to be updated
key = new ElKey()
{
key = elementKey
},
data = new ElData()
{
k = elementKey,
n = newElementName
}
},
tRds = moniker
};
//Update information in alphabetic order
var tResult = somClient.SetRdsElements(tSet);
return tResult;
}
See also: