- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2014 06:42 AM
Currently any incidents created by self service users has the "contact type" as "phone" which is our default value for the servicedesk. Is there anyway I can get this to change to our "self-service" option by default. On the self service view "contact type" is not a visible field so is set to phone by default when viewed by us and more importantly we cant track how many incidents are being raised by self service users.. Is there a way I can get it to default to self-service when non-itil users raise an incident using the self service view?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2014 07:51 AM
You probably only want the thing to run when it's loaded for the first time...
function onLoad() {
if(g_form.isNewRecord()){
if (g_user.hasRole("itil")) {
g_form.setValue("contact_type","phone");
}
else {
g_form.setValue("contact_type","self-service");
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2014 08:09 AM
Great

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2014 10:11 AM
Hi Garry,
If you have a moment, please mark the appropriate response as the Correct Answer if applicable.
thanks,
Lawrence
--
Online Community Program Manager, ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2014 08:54 PM
Hi Garry, saw a lot of good stuff around the client scripts already. What I meant was to put the script in the dictionary entry for contact_type, in the default value field. Here is a screenshot of what I meant just for future reference, but you've obviously seen there are plenty of ways to handle this.