Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Auto Reject an approval after 14 days

magoo
Kilo Expert

Hi All,

I have been trying to find a easy way to make it so any approvals older than 14 days will auto reject and then fire off a notification on why its being rejected.   Has anyone else had any luck with this?   I have tried approval rules based on create time etc and they don't seem to mark as rejected.   Does this need to be a business rule instead? If so does anyone have one they could provide?

 

Thanks!

 

Steve

10 REPLIES 10

Gwen Vanderhaeg
Kilo Expert

Hi guys,



I want a variation on this.
I want to specify the action to take based on:



1) source table


ok so for that I can probably just add approval.addQuery ('source_table' , 'kb_knowledge) or change request or whatever



2) in case of change requests -> the category of the change to which the approval is related.


e.g. if Category is permissions, we want auto-reject after 1 week


but if Category is "IT Change" or something, we want auto-approve after 1 week



Suggestions?



Gwen