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.
{
"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" : ""
}
]
}
}
}
}
}
}
{
"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: