Approval Required for a particular catalog item

nehasr1288
Tera Expert

Hi,

I have a workflow that autoapproves all request in my servicenow that is no approval required for any request.But there is this one item for

which I would require a   approval. How can I implement it without disturbing my workflow?

1 ACCEPTED SOLUTION

You can create business rule onsc_req_item table to generate dynamic approvals.



Please use below sample script



var approval = new GlideRecord('sysapproval_approver');


approval.initialize();


approval.approver = current.u_configuration_item.owner_service;


approval.sysapproval = current.sys_id;


approval.state = 'requested';


approval.insert();



Regards,


sachin


View solution in original post

10 REPLIES 10

create BR to generate adhoc approvals.



Regards,


Sachin


Can you please explain a bit more in detail? I am not sure about this


You can create business rule onsc_req_item table to generate dynamic approvals.



Please use below sample script



var approval = new GlideRecord('sysapproval_approver');


approval.initialize();


approval.approver = current.u_configuration_item.owner_service;


approval.sysapproval = current.sys_id;


approval.state = 'requested';


approval.insert();



Regards,


sachin


Hi ,



Thank you.


I used the script :


(function executeRule(current, previous /*null when async*/) {


var taskT= new GlideRecord('task');


var reqItem= new GlideRecord('sc_req_item');


var approval = new GlideRecord('sysapproval_approver');


var sys_user1=new GlideRecord('sys_user');


sys_user1.approver ='Abel Tuter';


approval.initialize();


approval.approver = 'Abel Tuter';


approval.sysapproval = current.sys_id;


approval.state = 'requested';


approval.insert();




})(current, previous);


Vichu
Mega Expert

I have a similar requirement but slightly different.

I am using a workflow named Access for all the catalog items. But for one catalog item i want an approval from a single person, this person is not a manger or the owner of the assignment group. I don't want to hardcore he person name under the approved by in the catalog item. Approval can be either on the request or ritm.

Any suggestions are highly appreciated.