HandleCustomObOperResult HandleCustomObOper(OdId tObj, HandleCustomObOperArg tArg)
tObj. Moniker of opened instance of custom class object.
tArg. Operation execution parameters.
The HandleCustomObOper operation is used to execute custom/standard operation for custom class object instance.
To execute the operation, in the tObj field specify moniker of custom class object instance, in the tArg.operationId field specify identifier of custom/standard class operation. The moniker can be obtained on executing the CreateCustomOb, OpenCustomOb operation. The executed operation identifier can be obtained in custom class metadata that can be obtained on executing the OpenCustomExtender, GetCustomExtender operations.
The HandleCustomObOper operation returns the result of executing custom/standard operation.
Below is the example of executing custom operation for custom class object instance. The request contains moniker of opened instance of custom object and identifier of the executed operation. The response contains operation execution result.
{
"HandleCustomObOper" :
{
"tObj" :
{
"id" : "KIJGJLGLBNIEGOAEKKDNNHHCKMKIANEEPIGPOKBNCCCNDLDC!M!S!OGJDCJCHLBNIEGOAEEJEBKIOHBNBIFPPEIIEEIAFBMGNGGONL"
},
"tArg" :
{
"operationId" : "EXPORT"
}
}
}
{
"HandleCustomObOperResult" :
{
"webFormResult" :
{
"handlerKey" : "10101"
},
"id" :
{
"id" : "KIJGJLGLBNIEGOAEKKDNNHHCKMKIANEEPIGPOKBNCCCNDLDC!M!S!OGJDCJCHLBNIEGOAEEJEBKIOHBNBIFPPEIIEEIAFBMGNGGONL"
},
"object" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "2",
"@hf" : "0",
"i" : "OBJ10106",
"n" : "Custom object",
"k" : "10106",
"c" : "2168577",
"p" : "10099",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
}
}
}
public static HandleCustomObOperResult HandleCustomObOper(string objMoniker, string operation)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tClose = new HandleCustomObOper()
{
tObj = new OdId() { id = objMoniker },
tArg = new HandleCustomObOperArg() { operationId = operation }
};
// Execute operation for custom class object instance
var tResult = somClient.HandleCustomObOper(tClose);
return tResult;
}
See also: