Approval not generated through workflow

Ashwini Jadhao
Giga Guru

Hi,

I had created workflow to send approval to user but the approval not generated.same things are working on the Personal Instance.but not on the client's instance.

the workflow not attached to the Incident table.

I gone through the  link as https://community.servicenow.com/community?id=community_question&sys_id=c1c013a9dbdcdbc01dcaf3231f96...

but it is not working.

1 ACCEPTED SOLUTION

AbhishekGardade
Giga Sage

Hello Ash,

As I understood, You need to create approvals in approval table and send it to the approvar with the help of business rule, right?.

Also for which table you need to generate the approval? RITM ? Incident? or what else?

I have created approval from business rule:

1. Business rule config:

2. Script:

var grApprover = new GlideRecord('sysapproval_approver');
grApprover.initialize();

//below fields are available on approave table (sysapproval_approver)
grApprover.state = 'requested'; // setting state to requested

// Here you can set who will be the approvar.
grApprover.approver = current.request.requested_for.manager;

// here you can specify for which record you need to generate apporval
grApprover.sysapproval = current.sys_id; 
grApprover.insert();

Please mark as Correct Answer/Helpful, if applicable.
Thanks! 
Abhishek Gardade

Thank you,
Abhishek Gardade

View solution in original post

5 REPLIES 5

Hello Ash,

I have created approval from business rule:

1. Business rule config:

2. Script:

var grApprover = new GlideRecord('sysapproval_approver');
grApprover.initialize();

//below fields are available on approave table (sysapproval_approver)
grApprover.state = 'requested'; // setting state to requested

// Here you can set who will be the approvar.
grApprover.approver = current.request.requested_for.manager;

// here you can specify for which record you need to generate apporval
grApprover.sysapproval = current.sys_id; 
grApprover.insert();

Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade

Thank you,
Abhishek Gardade