client Script set all fields to Mandatory & Visible
Import
·
Aug 21, 2020
·
article
client Script set all fields to Mandatory & Visible
UI Action / UI Policy
//For to set mandatory false (campos como - não obrigatório)
for (var i = 0; i < g_form.elements.length; i++)
{
var el = g_form.elements[i];
var fieldName = el.fieldName;
g_form.setMandatory(fieldName, false);
}
View original source
https://www.servicenow.com/community/developer-articles/client-script-set-all-fields-to-mandatory-visible/ta-p/2321486