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.

simple after business rule not working

juan9
Giga Guru

Im not sure what i am doing wrong haha.

when a record is created, and there is a after business rule that sets active to false, it does not work for some reason:

Screenshot 2024-08-17 at 8.48.36 AM.png

 

Screenshot 2024-08-17 at 8.49.49 AM.png

 

if i set the business rule to before it works.

 

here is a small video:
https://youtu.be/spq_8dQsuUA


if the rule was working when is set to after, would i get the updated record or would i have to refresh the page to see the updated record?

Uploaded by Juan Casas on 2024-08-17.
1 ACCEPTED SOLUTION

Yes thats the expected behavior, because you should not do this after, you should do this before.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

6 REPLIES 6

Yes thats the expected behavior, because you should not do this after, you should do this before.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Also see this (bit old, though still valid):
https://www.servicenow.com/community/developer-forum/business-rule-not-setting-values-on-incident/m-...

 

 "It looks like you're running this on when = after, which you can't use to set values"

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn