How to auto populate date fields in Agent Workspace

Brandon R1
Tera Contributor

I've created UI Policies, Client Scripts, and Business Rules to auto populate date fields in Agent Workspace and none of them are working. HELP!

 

In each of the methods above, I've primarily tried (as an example):

var today_date = new Date();
var today_date_str = formatDate(today_date, g_user_date_format);
g_form.setValue('u_date', today_date_str); //Set current date

...and the date field in Agent Workspace is always blank. It works fine in the platform UI for the same field but not in Agent Workspace. What am I doing wrong or missing to get ANY date field to auto populate?!?

 

Thanks,

Brandon

2 REPLIES 2

Community Alums
Not applicable

Suzanne H
Tera Guru

We are having issues with this as well. We do not want to uncheck Global because we do want it to apply on all forms. Brandon, you want want to subscribe to this post as well.

https://www.servicenow.com/community/hrsd-forum/ui-policy-show-hide-is-not-working-in-agent-workspac...