Populate Short Description Field On Incident Form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 03:29 AM
Hi Guys,
I want to populate some text filled in Short Description Field on Incident Form for a particular user.Let me know how to achieve this through client script
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 05:44 AM
What you can do is -- Create a client callable Script Include and call it in Client script through GlideAjax.
Its not recommended to use GlideRecord in Client script so we can take this approach.
http://wiki.servicenow.com/index.php%3Ftitle%3DGlideAjax&sa=U&ved=0ahUKEwjP4Kjh_KbVAhXHw7wK…
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 05:59 AM
Yeah i agree with it but i want to know where can I use GlideRecord in ServiceNow for insert,update,delete..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 06:13 AM
Gourav Das wrote:
Let me know how to achieve this through client script
Does it need to be a client script?
UI Policies could help, as could templates here. But you may want to build it as a business rule.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 09:14 PM
Hi Gourav,
1. If your question is to populate short description for only particular roled user then you can use below code.
Lets say you want the short description to be "Test" only for ITIL users then create an onload client script and use below code.
function onLoad(){
var userRole = g_user.hasRole('itil');
if (userRole)
{
g_form.setValue('short_description','Test');
}
}
2. Or if your question is to change the short description for the old incidents and for particular roles users, then you need to use a background script which checks for the user and updates multiple incident records.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2017 02:02 AM
Script please can you provide here so that it will be helpful for me further.