JavaScript

{dialog.object}formViewCommit Method

Syntax

{dialog.Object}.formViewCommit(UXformViewControlId)

{dialog.Object}.formViewCommit(UXformViewControlId, flagOnlyCommitDirtyFields)

Arguments

UXformViewControlIdstring

FormView control's ID.

flagOnlyCommitDirtyFieldsboolean

Default = false. Flags whether all fields or only dirty fields should be committed. Only applies to a FormView control with a List control data source.

Description

Commits the data in the FormView control back to the data source.

var result = {dialog.object}.formViewValidate("form1");
if(result){
    {dialog.object}.formViewCommit("form1");
    {dialog.object}.formViewRefresh("form1");
}

If a FormView is based on a List control data source, the commit action can be changed to only submit data that has been changed. To only commit dirty fields back to the List control from the FormView, set the optional flagOnlyCommitDirtyFields parameter to true:

var flagOnlyCommitDirtyFields = true;
{dialog.object}.formViewCommit('{form.id}',flagOnlyCommitDirtyFields);

See Also