The CreatorCon Call for Content is officially open! Get started here.

Can we create Approvals under Task table

Aruna Sree Yela
Tera Guru

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

 

6 REPLIES 6

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Aruna Sree Yela 

 

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]

****************************************************************************************************************

Amit Verma
Kilo Patron
Kilo Patron

Hi @Aruna Sree Yela 

 

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.

Hi @Amit Verma , How can I do that in workflow please?

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();

}

 

Regards
Harish