Problem task priority should auto populate from problem while creating a new problem task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 12:50 AM
Problem task priority should auto populate from problem while creating a new problem task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 01:05 AM
@AnkitC_77 Please refer the below link :
Please mark this as helpful and accept it as a solution if this resolves your query.
Thanks,
Sujatha V.M.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 01:32 AM
Hello @AnkitC_77
1. Navigate to System Definition > Client Scripts in ServiceNow.
2. Click on New to create a new client script.
3. Fill in the fields: - Name: Give a name to your client script. - Table: Select the Problem Task table (problem_task). - Type: Select OnLoad.
4. In the Script field, write the following script:
function onLoad() {
//Get the problem associated with this task
var problemGr = new GlideRecord('problem');
if (problemGr.get(g_form.getValue('problem'))) {
//Set the priority of the task same as the problem
g_form.setValue('priority', problemGr.getValue('priority'));
}
}
5. Click on Submit to save the client script.
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
Thanks
Nani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2024 02:25 AM
Also, the priority only needs to be auto-populated once when the new task is raised. Later both problem and problem tasks can have different priorities.