g_form.setValue does not update a database value of a record


Description

Symptoms

When utilizing g_form.setValue, for example in a client script, it will update the browser/client-side but will not update the XML/database value.

Release

All releases

Cause

This is expected behavior.  The GlideForm API is intended for client-side use only.

Resolution

In order ensure that the value set by g_form.setValue is saved to the database, you may either save the form manually afterward, or perform a GlideRecord update.