OpenWebForm

Syntax

OpenWebFormResult OpenWebForm(OdId tOb, OpenWebFormArg tArg)

Parameters

tOb. Moniker of repository object that is a web form.

tArg. Operation execution parameters.

Description

The OpenWebForm operation opens a web form.

Comments

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.

Example

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.

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">
<OpenWebForm xmlns="http://www.fsight.ru/PP.SOM.Som">
<tOb xmlns="">
  <id>JAIKPLIJFFCBGOAEFFBKJBHEGIPOBIEENJBIDLIKIPOIMHCL!M!341659</id>
  </tOb>
<tArg xmlns="">
<args>
  <openForEdit>true</openForEdit>
  </args>
  </tArg>
  </OpenWebForm>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"OpenWebForm" :
{
"tOb" :
{
"id" : "JAIKPLIJFFCBGOAEFFBKJBHEGIPOBIEENJBIDLIKIPOIMHCL!M!341659"
},
"tArg" :
{
"args" :
{
"openForEdit" : "true"
}
}
}
}

JSON response:

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

Working with Development Environment