OpenWebFormResult OpenWebForm(OdId tOb, OpenWebFormArg tArg)
tOb. Moniker of repository object that is a web form.
tArg. Operation execution parameters.
The OpenWebForm operation opens a web form.
The operation gets access to metadata and web form code. To execute the operation, in the tOb field specify moniker of the repository object that is a web form, and in the tArg field specify opening parameters. The moniker can be obtained on executing the GetObjects operation. In the tArg.meta field specify empty values or default values for the fields, which values should be obtained.
The operation results in the moniker of opened web form instance and metadata if the tArg.meta field is determined.
Below is the example of opening a web form. The request contains moniker of the repository object that is a web form. The response contains moniker of opened web form instance.
The example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.
{
"OpenWebForm" :
{
"tOb" :
{
"id" : "JAIKPLIJFFCBGOAEFFBKJBHEGIPOBIEENJBIDLIKIPOIMHCL!M!341659"
},
"tArg" :
{
"args" :
{
"openForEdit" : "true"
}
}
}
}
{
"OpenWebFormResult" :
{
"id" :
{
"id" : "JAIKPLIJFFCBGOAEFFBKJBHEGIPOBIEENJBIDLIKIPOIMHCL!M!S!WFEGNCAPIJFFCBGOAELIJILLJGDJIDPIMEGLDMIMKMGNIIGMGI"
}
}
}
public static OpenWebFormResult OpenWebForm(MbId mb, string formId, bool forEdit = false)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tOpen = new OpenWebForm()
{
tArg = new OpenWebFormArg()
{
args = new WebFormOpenArgs()
{
openForEdit = forEdit
}
},
// Create object moniker
tOb = new OdId() { id = mb.id + "!" + FindObjectById(mb, formId).k }
};
// Open web form
var result = somClient.OpenWebForm(tOpen);
return result;
}
See also: