- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 12:13 PM
When an incident is created, default assignment group should be set as "IT Systems". I was told that the best practice is to create a client script instead of setting the default value in form design.
Can anyone share script (screenshot) and suggestions?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 12:23 PM
Client scripts are subject to the whim of the client browser. I think it is best practice to move as much of the processing as you can to the server. I would not go Client Script here.
I would do the before insert that was suggested above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2016 10:34 AM
we had a problem where we were using a new table extended from TASK, so we could not use the sys_dictionary defaults
additionally, the field was required on a null form so a BR really wouldn't do the trick either...
and because we have so few client scripts running now (and the audience for the application is 6 users), we felt that a client script was the best way to go...
our script:
function onLoad() {
var ag = g_form.getValue('assignment_group');
if (ag == '')
{
g_form.setValue('assignment_group','sys_id_value_here');
g_form.setReadOnly('assignment_group',true);
}
}
Of course, using a hard coded SYS_ID is also not suggested, however our assignment group is the servicenow development team...so if that group goes away, servicenow will pretty much go away too (not likely).
I look forward to explaining this decision when we review our next ACE report