Simple Business Rule from the task_sla table not working

Runel
Giga Expert

Hi! I'm seeking help with the below business rule.  I need the business rule to run after the record is updated.  I'm trying to automate the closing of demand tasks that have breached SLA.  Any help is greatly appreciated!

Runel_0-1712864382770.png

Runel_1-1712864397193.png

 

1 ACCEPTED SOLUTION

Runel
Giga Expert

@AakashG0904 & @Community Alums Thank you for your help and my apologies for not being more specific.  I change the BR to run before, created a new system property named "glide.record.update_ref_changes" and set it to true, and made the "Update reference fields" checkbox available in the BR form and checked it. The new system property and "Update reference fields" checkbox allow updates to related tables which was causing the issue (fields selected in "set field values" field in the Actions tab were not updating).  Thanks again!

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0694481

 

Runel_0-1714667104882.png

 

View solution in original post

3 REPLIES 3

AakashG0904
Tera Expert

Hi @Runel,

Hope you are doing well.

 

Please be ensure that the conditions set by you in your Business Rule are correct. You must have the records with both the conditions that you have applied.

 

Thanks

Aakash Garg

ServiceNow Developer

Community Alums
Not applicable

Hi @Runel ,

I tried your problem in my PDI and I hope below answer helps you

I created before BR and I added one condition like "Has Breached = true" and also added below code 

 

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

	// Add your code here
	current.setValue('stage', cancelled);

})(current, previous);

 

 

Result before 

SarthakKashya2_0-1712905720624.png

Result After 

SarthakKashya2_1-1712905736854.png

 

Here's the reference of BR 

SarthakKashya2_2-1712905764603.png

 

SarthakKashya2_3-1712905775376.png

 

Please mark my answer correct and helpful if this works for you

 

Thanks and Regards 

Sarthak

 

Runel
Giga Expert

@AakashG0904 & @Community Alums Thank you for your help and my apologies for not being more specific.  I change the BR to run before, created a new system property named "glide.record.update_ref_changes" and set it to true, and made the "Update reference fields" checkbox available in the BR form and checked it. The new system property and "Update reference fields" checkbox allow updates to related tables which was causing the issue (fields selected in "set field values" field in the Actions tab were not updating).  Thanks again!

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0694481

 

Runel_0-1714667104882.png