Suspend Dialog issues
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 06:48 AM
Hi All,
On the case form when the state is changed to "Pending" . We get the dialog box with three options- "Reason ", "worknotes" and "Due date" . But the same is not the case with Agent workspace when we change the state to "Pending" it shows only 2 options - "Reasons", and "worknotes" .
On raising hi ticket they told us this is customized UI page - "Suspend dialog". Can any one help me to get the option of pending due date back on agent workspace . Attaching the screenshot of both dialog box .
Name of the field on form is -u_pending_due_date

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 08:22 AM - edited 07-10-2023 08:23 AM
My instance only has "SM Suspend Dialog" as a UI Page, but the below should be similar to what you will need to do. You can add this to the HTML:
<div class="form-group is-required row">
<label for="due_date" class="control-label col-sm-3" style="text-align:right">
<span class="required-marker"></span>${gs.getMessage('Due Date')}
</label>
<span class="col-sm-9">
<input id="due_date" class="col-sm-9 form-control" required="required" rows="3" type="date" aria-required="true" placeholder="Due Date" name="due_date" />
</span>
</div>
You can then reference this as "due_date" in the "Processing script." In my instance, the "SM Suspend Dialog" has three places where it needs to be added. It looks like yours is maybe just the hrTask record, which would be added here in the "SM Suspend Dialog" script (see commented line):
if(order.sys_class_name.includes('hr_case') && suspend_reason.toUpperCase() == 'DOCUMENT') {
var shortDesc = gs.getMessage('Document requested for HR Case {0}', order.number);
var hrTask = new GlideRecord('hr_task');
hrTask.initialize();
hrTask.parent = order.sys_id;
hrTask.assigned_to = order.opened_for.sys_id;
hrTask.request_suspension_reason = 'document';
hrTask.suspend_request = 'true';
hrTask.u_pending_due_date = due_date; //this line was added per the HTML
hrTask.short_description = gs.getMessage(shortDesc);
hrTask.description = gs.getMessage(suspend_comments);
hrTask.hr_task_type = "document_attachment";
taskCreated = hrTask.insert();
}
Let me know if I can provide further assistance, and make sure to mark this response if it was helpful accordingly!
-Matt