Show contents 

Web Service > Web Service Operations > Working with Development Environment > OpenWebForm

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 allows for getting 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 was defined.

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>OLFDALNNBBFEGOAEGJFAPCEOMHPCOHIEIKADOOOFNHINOGAL!M!402446</id>
  </tOb>
<tArg xmlns="">
<args>
  <openForEdit>true</openForEdit>
  </args>
<meta>
  <text />
  </meta>
  </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>OLFDALNNBBFEGOAEGJFAPCEOMHPCOHIEIKADOOOFNHINOGAL!M!S!WFCLOMMLNNBBFEGOAEMLACIMNEFMDKNONEJKFAOPKOCKGPLBAH</id>
  </id>
<meta xmlns="">
  <text>Class OBJ402445WebForm: WebForm Button1: WebButton; Input2: WebInput; Label2: WebLabel; Input1: WebInput; Label1: WebLabel; End Class OBJ402445WebForm;</text>
  </meta>
  </OpenWebFormResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"OpenWebForm" :
{
"tOb" :
{
"id" : "OLFDALNNBBFEGOAEGJFAPCEOMHPCOHIEIKADOOOFNHINOGAL!M!402446"
},
"tArg" :
{
"args" :
{
"openForEdit" : "true"
},
"meta" :
{
"text" : ""
}
}
}
}

JSON response:

{
"OpenWebFormResult" :
{
"id" :
{
"id" : "OLFDALNNBBFEGOAEGJFAPCEOMHPCOHIEIKADOOOFNHINOGAL!M!S!WFCLOMMLNNBBFEGOAEMLACIMNEFMDKNONEJKFAOPKOCKGPLBAH"
},
"meta" :
{
"text" : "Class OBJ402445WebForm: WebForm \tButton1: WebButton; \tInput2: WebInput; \tLabel2: WebLabel; \tInput1: WebInput; \tLabel1: WebLabel; \t End Class OBJ402445WebForm;"
}
}
}
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
},
meta = new GetWebFormMD()
{
text = string.Empty
}
},
// 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