how to RITM approver as a sctask assigned to person

test2service
Tera Contributor

Hi Team,

 Can you help me below requirement - high priority

 

For my catalog item we have a RITM level Group approval is there (Group name - Desktop) same group Assignment group also for Catalog Task.

Here I need help who approve the RITM group approval that person we need to auto populate assigned to in the catalog Task. Because both approval group and assignment group both are same and the SC task is automation task.

 

Thanks,

Thanuja

1 ACCEPTED SOLUTION

Ok. While creating the task in the workflow, you should query the sysapproval_approver table and get the approver name and assign it to task.

var app = new GlideRecord('sysapproval_approver');
app.addQuery('document_id',current.getValue('sys_id'));
app.addQuery('state','approved');
app.query();

if (app.next())
{
task.assigned_to = app.approver;
}

Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

4 REPLIES 4

SanjivMeher
Kilo Patron
Kilo Patron

You need to add that logic in flow designer or workflow, whichever you are using to create the SC task to set the assignment group as approval group


Please mark this response as correct or helpful if it assisted you with your question.

test2service
Tera Contributor

Hi Sanjeev Meher,

Already we set the group approval in RITM same group fufillement group also .

The task will be auto closed that time assigned to is empty. so for that we want to call ritm approver as a assigned to

 

Ok. While creating the task in the workflow, you should query the sysapproval_approver table and get the approver name and assign it to task.

var app = new GlideRecord('sysapproval_approver');
app.addQuery('document_id',current.getValue('sys_id'));
app.addQuery('state','approved');
app.query();

if (app.next())
{
task.assigned_to = app.approver;
}

Please mark this response as correct or helpful if it assisted you with your question.

test2service
Tera Contributor

I am using workflow 

test2service_0-1717005092624.png