Applying Changes in Custom Class

Below is the example of applying changes in a custom class. The request contains moniker of opened custom class container instance and changed class metadata. The response does not contains metadata.

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">
<SetCustomExtender xmlns="http://www.fsight.ru/PP.SOM.Som">
<tCustomExtender xmlns="">
  <id>JFHDCPAHAHHCGOAEINHJAHNJDKAOLMFEPJOPHAHKLDFBMCCP!M!S!EEMPBGPAHAHHCGOAEDPGADAFLDKKBEEAEKKOADCJKHIMOAOGI</id>
  </tCustomExtender>
<tArg xmlns="">
<pattern>
  <obInst>true</obInst>
  <parsOwnDefVals>true</parsOwnDefVals>
  <classes>Change</classes>
<customClass>
  <smallImage>true</smallImage>
  <largeImage>true</largeImage>
  <CustomOperations>Change</CustomOperations>
  </customClass>
  </pattern>
<meta>
<classes>
<its>
<it ic="false">
  <k>33</k>
  <id>CUSTOM_OBJECT</id>
  <n>Custom object</n>
  <vis>true</vis>
  <implURL />
<standardOperations>
<its>
<it>
  <k>0</k>
  <id>OPEN</id>
  <n>Open</n>
  <vis>true</vis>
  </it>
<it>
  <k>1</k>
  <id>OPENWITHPARAMS</id>
  <n>Open with parameters</n>
  <vis>true</vis>
  </it>
<it>
  <k>2</k>
  <id>EDIT</id>
  <n>Edit</n>
  <vis>true</vis>
  </it>
<it>
  <k>3</k>
  <id>DELETE</id>
  <n>Delete</n>
  <vis>true</vis>
  </it>
<it>
  <k>4</k>
  <id>PASTE</id>
  <n>Paste</n>
  <vis>true</vis>
  </it>
  </its>
  </standardOperations>
<operations>
<its>
<it>
  <k>1</k>
  <id>CLS33OP1</id>
  <n>Object export</n>
  <vis>true</vis>
  </it>
  </its>
  </operations>
  <c>2168577</c>
  <h>false</h>
  <implAssembly>OperationsClass</implAssembly>
  <implClass />
  <description />
  </it>
  </its>
  </classes>
  </meta>
  </tArg>
  </SetCustomExtender>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<SetCustomExtenderResult 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">
<id xmlns="">
  <id>JFHDCPAHAHHCGOAEINHJAHNJDKAOLMFEPJOPHAHKLDFBMCCP!M!S!EEMPBGPAHAHHCGOAEDPGADAFLDKKBEEAEKKOADCJKHIMOAOGI</id>
  </id>
  </SetCustomExtenderResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetCustomExtender" :
{
"tCustomExtender" :
{
"id" : "JFHDCPAHAHHCGOAEINHJAHNJDKAOLMFEPJOPHAHKLDFBMCCP!M!S!EEMPBGPAHAHHCGOAEDPGADAFLDKKBEEAEKKOADCJKHIMOAOGI"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"parsOwnDefVals" : "true",
"classes" : "Change",
"customClass" :
{
"smallImage" : "true",
"largeImage" : "true",
"CustomOperations" : "Change"
}
},
"meta" :
{
"classes" :
{
"its" :
{
"it" :
[
{
"@ic" : "false",
"k" : "33",
"id" : "CUSTOM_OBJECT",
"n" : "Custom object",
"vis" : "true",
"implURL" : "",
"standardOperations" :
{
"its" :
{
"it" :
[
{
"k" : "0",
"id" : "OPEN",
"n" : "Open",
"vis" : "true"
},
{
"k" : "1",
"id" : "OPENWITHPARAMS",
"n" : "Open with parameters",
"vis" : "true"
},
{
"k" : "2",
"id" : "EDIT",
"n" : "Edit",
"vis" : "true"
},
{
"k" : "3",
"id" : "DELETE",
"n" : "Delete",
"vis" : "true"
},
{
"k" : "4",
"id" : "PASTE",
"n" : "Paste",
"vis" : "true"
}
]
}
},
"operations" :
{
"its" :
{
"it" :
[
{
"k" : "1",
"id" : "CLS33OP1",
"n" : "Object export",
"vis" : "true"
}
]
}
},
"c" : "2168577",
"h" : "false",
"implAssembly" : "OperationsClass",
"implClass" : "",
"description" : ""
}
]
}
}
}
}
}
}

JSON response:

{
"SetCustomExtenderResult" :
{
"id" :
{
"id" : "JFHDCPAHAHHCGOAEINHJAHNJDKAOLMFEPJOPHAHKLDFBMCCP!M!S!EEMPBGPAHAHHCGOAEDPGADAFLDKKBEEAEKKOADCJKHIMOAOGI"
}
}
}
public static SetCustomExtenderResult ApplyCustomClassChanges(string moniker, CustomClass changedClass)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetCustomExtender()
{
tArg = new SetCustomExtenderArg()
{
pattern = new CustomExtenderMdPattern()
{
classes = ListOperation.Change,
customClass = new CustomClassPattern()
{
CustomOperations = ListOperation.Change
}
},
meta = new CustomExtenderMd()
{
classes = new CustomClasses()
{
its = new CustomClass[]
{
changedClass
}
}
}
},
tCustomExtender = new CustomObId() { id = moniker }
};
// Change custom class settings
var tResult = somClient.SetCustomExtender(tSet);
return tResult;
}

See also:

SetCustomExtender: Operation