Can we create Approvals under Task table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 03:17 AM - edited 03-06-2024 03:17 AM
Hi,
Can we create approvals under task table?
Scenario:
There is a case table which is having task records generated once RP gets submitted.
I wanted to create approvals under task record but not on case record.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 03:19 AM
I think no, as it is on case so approval will be on case.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 04:26 AM
Have you tried creating the Approval using Flow action "Ask for Approval" ? You can map a task record for creating approval on it. You can also read this blog which could be helpful https://www.servicenow.com/community/itom-blog/seeking-approval-part-2-task-vs-non-task-approvals-an...
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 04:32 AM
Hi @Amit Verma , How can I do that in workflow please?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 04:48 AM - edited 03-06-2024 04:49 AM
Hi @Aruna Sree Yela you would need to place the script where you create the task
var task = new GlideRecord('sc_task'); task.initialize();
var sysid = task.insert();
// Create a new approval record
var approvalRecord = new GlideRecord('sysapproval_approver');
approvalRecord.setValue('document_id', sysid);
approvalRecord.setValue('approver', 'user_sys_id'); // Replace 'user_sys_id' with the Sys ID of the approver
approvalRecord.setValue('state', 'requested');
approvalRecord.insert();
}
Harish