Agent Workspace Client Script g_modal

Raaj Kumar1
Tera Contributor

Hi,

 

I need to display fields on the Agent Workspace on click of a UI Action. I found a reference link -> www.ashleysn.com/post/workspace-ui-actions and was able to do it but the catch is I need to display a date field which I was not able to find in any ServiceNow forum. If someone could help me on this it would be a great help. 

 

My Current Script -

 

function onClick(g_form) {
g_modal.showFields({
title: "Enter your reason",
fields: [{
type: 'textarea',
name: 'work_notes',
label: getMessage('Reason'),
mandatory: true
}],
size: 'lg'
}).then(function(fieldValues) {
g_form.setValue('work_notes', fieldValues.updatedFields[0].value);
g_form.save();
});
}

0 REPLIES 0