Agent Workspace Client Script g_modal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 01:59 PM - edited 12-08-2022 02:01 PM
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();
});
}