- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2023 08:29 PM - edited 04-27-2023 09:54 PM
Channel field should automatically populate with 'Self Service' if an Itil user raised an incident using the Self-Service portal.
If an Itil user raise an incident using the ServiceNow tool, Channel field should be automatically filled in with "User."
How to achieve this requirement.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2023 03:06 AM
Thank you for reply.
Working the below code for me.
Table : incident
UI Type : All
Type : onLoad
Script :
var chanVal = g_form.getValue('contact_type');
if (g_user.hasRoleExactly("itil") && chanVal != 'self-service') {
g_form.setValue('contact_type', 'User');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2023 02:17 AM
@Suresh KSB --
You need to write client script as below :
Table : incident
UI Type : All
Type : onLoad
Script :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2023 03:03 AM
Thanks for your reply.
Working the below code for me.
Table : incident
UI Type : All
Type : onLoad
Script :
var chanVal = g_form.getValue('contact_type');
if (g_user.hasRoleExactly("itil") && chanVal != 'self-service') {
g_form.setValue('contact_type', 'User');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2023 03:06 AM
Thank you for reply.
Working the below code for me.
Table : incident
UI Type : All
Type : onLoad
Script :
var chanVal = g_form.getValue('contact_type');
if (g_user.hasRoleExactly("itil") && chanVal != 'self-service') {
g_form.setValue('contact_type', 'User');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2023 03:16 AM
Thank you for reply.
Working the below code for me
Table : incident
UI Type : All
Type : onLoad
Script :
var chanVal = g_form.getValue('contact_type');
if (g_user.hasRoleExactly("itil") && chanVal != 'self-service') {
g_form.setValue('contact_type', 'User');
}