Notifications

13 views

Description

DOM manipulation techniques for making fields read-only on a form can cause ATF failures. It causes ATF failure with error: Client request did not provide serialized form data.

Release or Environment

All

Cause

DOM manipulation is not advised in Servicenow, as it causes issues such as these. Read more in the product documentation: Avoid DOM Manipulation.

Example:

If we use a client script which contains the code with DOM Manipulation (.disabled=true;) to make field read-only, causes the parameters not to be able to get serialized from the form and It causes ATF failure with error: Client request did not provide serialized form data.

var form = document.getElementById('change_request.do');
if (form) {
for (var x=0; x< form.elements.length; x++) {
form.elements[x].disabled=true;
}}

Resolution

Use the supported API called GlideForm(g_form)

Article Information

Last Updated:2019-12-03 07:36:57
Published:2019-12-03