Create Approval on Catalog task (sc_task)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2020 08:09 AM
Hello Everybody,
I have an question:
It's possible create sc_task with Approval from the workflow.
I need create several sc_task with differents users approvals because I search by script the differents approval users.
It's possible to script?
Thanks a lot.
Best regard
- Labels:
-
Request Management
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2020 08:58 AM
Hey Lylys,
Yes you can send approval by Gliding sysapproval_approver, Here is how you can do it:
Script:
I used this script for incident form you can modify it according to your need
var gr=new GlideRecord('sysapproval_approver');
gr.initialize();
gr.sysapproval=current.sys_id; (Modifiable)
gr.approver=current.assigned_to.manager; (Modifiable)
gr.state='requested';
gr.insert();
By writing this script you will be able to send the approval from anywhere.
Please mark my comment helpful and if i was able to resolve your query then Please mark Correct and close the thread.
Thanks and Regards:
Utpal Dutta
DxSherpa Pvt. Ltd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2020 07:26 AM
Hello @Utpal Dutta
Thanks for your response.
I test this script, but the approval doesn't create on my task.
I tried this script on the create task activity:
But It's doen't run, after I put the script after the task activity, it's not possible because, the approvers are create when the task is close.
var gr=new GlideRecord('sysapproval_approver');
gr.initialize();
gr.sysapproval=task.sys_id;
gr.approver=current.assigned_to.manager;
gr.state='requested';
gr.insert();
Thanks,
Lylys

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2020 09:10 PM
It will be created under sysaporoval_approver table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2020 12:55 AM
Sorry I don't undestand your response.