- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2024 03:52 AM
Hi,
I am creating a problem task from a problem table using UI Action. I tried it, but it is not working. Kindly help.
var gr = new GlideRecord('problem_task');
gr.initialize();
gr.short_description = current.short_description;
gr.assigned_to = current.assigned_to;
gr.insert();
action.setRedirectURL(current);
Regards
Suman P.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2024 04:16 AM
Hi @Community Alums ,
Please update the script below
var gr = new GlideRecord('problem_task');
gr.initialize();
gr.short_description = current.short_description;
gr.assigned_to = current.assigned_to;
gr.problem=current.sys_id;// link problem to problem task
gr.insert();
action.setRedirectURL(current);
Please mark helpful & correct answer if it's really worthy for you.
Thanks,
BK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2024 04:16 AM
Hi @Community Alums ,
Please update the script below
var gr = new GlideRecord('problem_task');
gr.initialize();
gr.short_description = current.short_description;
gr.assigned_to = current.assigned_to;
gr.problem=current.sys_id;// link problem to problem task
gr.insert();
action.setRedirectURL(current);
Please mark helpful & correct answer if it's really worthy for you.
Thanks,
BK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2024 04:20 AM
@Community Alums As mentioned above by @Bhavya11 You also need to assign the Problem task with the parent record which would be the Problem on which you initiate the UI action.
Please mark helpful & correct answer if it's really worthy for you.
Thanks,
Ankit Shukla
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2024 04:22 AM
Hi @Community Alums,
Problem task is being created but without linking to the problem record. If you want to link problem to problem task record, use
gr.problem = current.sys_id;
If you found my response helpful, please mark it as Solution and Helpful.
Thanks and Regards,
Ehab