Rejection note in approval record.

Pandu8
Kilo Contributor

Hi Team,

 

Let's say A B C are three approvers for a particular requested item now for example A rejected his approval request,

IN B and C approval records rejection note needs to be populated in comments as "The Approval request has been rejected by A".

Let's say if A approvers his approval request then the same approval note needs to be populate in comments as "The approval request has been approved by A no action required".

Please respond how to achieve this requirement awaiting for your reply.Thank you in advance.

 

 

 

1 ACCEPTED SOLUTION

rahulpandey
Kilo Sage

Hi,

Instead of adding comments , you can define in activity :

Wait forA choice between different approval logics to determine which individual approvals result in approval of the activity's approval. Options are:
  • Anyone to approve: Any user can approve and the first approval causes the activity to complete with a result of approved.
  • Everyone to approve: All users must approve (see below for how a rejection is handled).
  • First response from anyone: The first approval or rejection from any user causes the activity to complete.
  • Condition based on script: Each time a user approves or rejects, the Approval script is called to determine if the activity should complete.
When anyone rejects
A choice between different approval logics to determine which individual rejections result in rejection of the activity's approval. Options are:
  • Reject the approval: Immediately complete the activity with a result of rejected.
  • Wait for other responses before deciding: Wait until we get other responses before making an approval or rejection decision. This allows users to change their mind until a decision is made.
Note: Note that if Wait for is set to Anyone to approvethen a single approval will cause the activity to complete with a result of approved even if one or more users reject.

However, if you do not want to follow above, then create a business rule (before on update) on approval table with below condition and script

condition = state changes to reject

var gr1 = new GlideRecord('sysapproval_approver');
gr1.addQuery('document_id', current.document_id);
gr1.addQuery('sys_id', '!=', current.sys_id);
gr1.query();
while(gr1.next()){
gr1.comments = "Approval Rejected by "+current.;
gr1.update();

 

Same can be done for approval approved

View solution in original post

5 REPLIES 5

rahulpandey
Kilo Sage

Hi,

Instead of adding comments , you can define in activity :

Wait forA choice between different approval logics to determine which individual approvals result in approval of the activity's approval. Options are:
  • Anyone to approve: Any user can approve and the first approval causes the activity to complete with a result of approved.
  • Everyone to approve: All users must approve (see below for how a rejection is handled).
  • First response from anyone: The first approval or rejection from any user causes the activity to complete.
  • Condition based on script: Each time a user approves or rejects, the Approval script is called to determine if the activity should complete.
When anyone rejects
A choice between different approval logics to determine which individual rejections result in rejection of the activity's approval. Options are:
  • Reject the approval: Immediately complete the activity with a result of rejected.
  • Wait for other responses before deciding: Wait until we get other responses before making an approval or rejection decision. This allows users to change their mind until a decision is made.
Note: Note that if Wait for is set to Anyone to approvethen a single approval will cause the activity to complete with a result of approved even if one or more users reject.

However, if you do not want to follow above, then create a business rule (before on update) on approval table with below condition and script

condition = state changes to reject

var gr1 = new GlideRecord('sysapproval_approver');
gr1.addQuery('document_id', current.document_id);
gr1.addQuery('sys_id', '!=', current.sys_id);
gr1.query();
while(gr1.next()){
gr1.comments = "Approval Rejected by "+current.;
gr1.update();

 

Same can be done for approval approved

Hello Rahul,

 

If I selected the "Wait for other responses before deciding" in rejection flow, it is still rejecting the overall flow, and my request gets rejected. for 10 approvals if 3 rejects, the condition waits for all the approvals, but then rejects the request

And once a user approves/rejects he cannot change his decision. an error occurs saying "Security does not allow the execution of that action against the specified record"

how to deal with this, please help

harishdasari
Tera Guru

Hi Pandu,

Use the Inbound email actions in your case.

If A rejects the approval it should trigger an email to B,C approvers. If they reply back to the email, then worknotes will get updated.

Thank you.