Glide Form API
Glide Form API
function onLoad() {
alert('Hi All Today is Friday');
g_form.setMandatory('subcategory', true);
g_form.setReadOnly('description', true);
g_form.setVisible('business_service', false);
g_form.setVisible('contact_type', false);
g_form.setDisabled('u_food_options', true);
g_form.addOption('category', 'food_n_fun', 'Food N Fun');
g_form.removeOption('state', 3);
g_form.addInfoMessage('Time is 10:00pm IST');
g_form.addErrorMessage('Tomorrow is Saturday as well its a womens
day');
g_form.showFieldMsg('impact', 'Please select in range of 1 to 3',
'info');
g_form.showFieldMsg('short_description', 'Based on Urgency select the
range out of 1 to 3', 'error');
alert(g_form.getValue('priority'));
g_form.setValue('short_description', 'Hi All I like Saturdays');
g_form.clearMessages();
g_form.clearValue('description');
g_form.addDecoration('number', ' icon-home', 'Refernce Value', 'color-
blue');
g_form.addDecoration('assignment_group', 'icon-star', 'Select Correct
Group', 'color-red');
g_form.removeDecoration('number', ' icon-home', 'Refernce Value',
'color-blue');
alert(g_form.getTableName('caller_id'));
alert(g_form.getLabelOf('location'));
alert(g_form.isNewRecord());
g_form.hideFieldMsg('impact');
g_form.hideRelatedList('task_sla.task');
g_form.hideRelatedLists();
g_form.setLabelOf('category','Software Choices');
g_form.clearOptions('state');
g_form.setSectionDisplay('notes',false);
alert(g_form.getSectionNames());
}
____________________________________________________________________________
CheatSheet : https://blog.snowycode.com/post/glide-form-cheat-sheet