HandleCustomObOper

Syntax

HandleCustomObOperResult HandleCustomObOper(OdId tObj, HandleCustomObOperArg tArg)

Parameters

tObj. Moniker of opened instance of custom class object.

tArg. Operation execution parameters.

Description

The HandleCustomObOper operation is used to execute custom/standard operation for custom class object instance.

Comments

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.

Example

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<HandleCustomObOper xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObj xmlns="">
  <id>KIJGJLGLBNIEGOAEKKDNNHHCKMKIANEEPIGPOKBNCCCNDLDC!M!S!OGJDCJCHLBNIEGOAEEJEBKIOHBNBIFPPEIIEEIAFBMGNGGONL</id>
  </tObj>
<tArg xmlns="">
  <operationId>EXPORT</operationId>
  </tArg>
  </HandleCustomObOper>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<HandleCustomObOperResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<webFormResult xmlns="">
  <handlerKey>10101</handlerKey>
  </webFormResult>
<id xmlns="">
  <id>KIJGJLGLBNIEGOAEKKDNNHHCKMKIANEEPIGPOKBNCCCNDLDC!M!S!OGJDCJCHLBNIEGOAEEJEBKIOHBNBIFPPEIIEEIAFBMGNGGONL</id>
  </id>
<object xmlns="" ds="" isShortcut="0" isLink="0" ver="2" hf="0">
  <i>OBJ10106</i>
  <n>Custom object</n>
  <k>10106</k>
  <c>2168577</c>
  <p>10099</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </object>
  </HandleCustomObOperResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"HandleCustomObOper" :
{
"tObj" :
{
"id" : "KIJGJLGLBNIEGOAEKKDNNHHCKMKIANEEPIGPOKBNCCCNDLDC!M!S!OGJDCJCHLBNIEGOAEEJEBKIOHBNBIFPPEIIEEIAFBMGNGGONL"
},
"tArg" :
{
"operationId" : "EXPORT"
}
}
}

JSON response:

{
"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:

Working with Custom Class Objects