Web Service > Web Service Operations > Working with Development Environment > SaveWebForm
bool SaveWebForm(WebFormId tWebForm, SaveWebFormArg tArg)
tWebForm. Opened web form instance moniker.
tArg. Operation execution parameters.
The SaveWebForm operation saves web form changes.
To execute the operation, in the tWebForm field specify opened web form instance moniker, and in the tArg.meta field specify updated metadata that should be saved. The moniker can be obtained using the OpenWebForm operation.
The operation results in the logical true if web form changes were saved successfully.
Below is the example of saving web form changes. The request contains opened web form instance moniker and updated form code. The response contains whether changes were saved successfully.
{
"SaveWebForm" :
{
"tWebForm" :
{
"id" : "OLFDALNNBBFEGOAEGJFAPCEOMHPCOHIEIKADOOOFNHINOGAL!M!S!WFCLOMMLNNBBFEGOAEMLACIMNEFMDKNONEJKFAOPKOCKGPLBAH"
},
"tArg" :
{
"meta" :
{
"text" : "Class OBJ402445WebForm: WebForm\tButton1: WebButton;\tInput2: WebInput;\tLabel2: WebLabel;\tInput1: WebInput;\tLabel1: WebLabel;\tEnd Class OBJ402445WebForm; \/\/... \/\/Form code comments \/\/..."
}
}
}
}
{
"SaveWebFormResult" : "1"
}
public static bool SaveWebForm(string moniker, string newText = "")
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
var tSave = new SaveWebForm()
{
tArg = new SaveWebFormArg()
{
meta = new SetWebFormMD()
{
text = newText
}
},
tWebForm = new WebFormId() { id = moniker }
};
// Save web form changes
var result = somClient.SaveWebForm(tSave);
return result;
}
See also: