Below is the example of using the DeleteObjects operation to delete multiple objects from the repository. The request contains moniker of repository connection and description of deleted objects.
{
"DeleteObjects" :
{
"tMb" :
{
"id" : "FNDKOLJACBNNFOAEDCEENEKPOGMMOOGEBLEIHFKEJOFOFMNJ!M"
},
"tArg" :
{
"objects" :
{
"its" :
{
"d" :
[
{
"@isShortcut" : "false",
"@isLink" : "false",
"@hf" : "false",
"i" : "NEWFORM1",
"n" : "NewForm1",
"k" : "305000",
"c" : "1538",
"p" : "65",
"h" : "false",
"hasPrv" : "false",
"ic" : "false"
},
{
"@isShortcut" : "false",
"@isLink" : "false",
"@hf" : "false",
"i" : "NEWFORM2",
"n" : "NewForm2",
"k" : "305001",
"c" : "1538",
"p" : "65",
"h" : "false",
"hasPrv" : "false",
"ic" : "false"
}
]
}
}
}
}
}
{
"DeleteObjectsResult" : ""
}
public static DeleteObjectsResult DelObjects(MbId mb, Od[] objects)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tDel = new DeleteObjects()
{
tArg = new DeleteObjectsArg()
{
objects = new Ods
{
its = objects
}
},
tMb = new MbId() { id = mb.id }
};
//Delete objects
var result = somClient.DeleteObjects(tDel);
return result;
}
See also: