Business Rule - Fields in filter condition and current-previous values.

Ramya30
Tera Contributor

Hi,

I have written an 'after' business rule to trigger a REST message to POST data from one instance to another. The Business Rule is written on sys_app table, with condition set on version field: Version changes. With this configuration, I was able to access correct values for current.version and previous.version into the REST message.

However, we faced some issues with version field as the filter condition. The BR didn't trigger at times. So, I changed the filter condition to another field. Now current.version and previous.version return the same value. Is there any dependencies on the filed to be used in filter condition to fetch the current and previous values of that field?

Thanks

Ramya

 

 

 

13 REPLIES 13

Sudhanshu Talw1
Tera Guru

Hi,

 

Has the version been changed for that call?

Simply use gs.log to verify the values

Thanks

Sudhanshu

yes, version changes. I did use gs.log and verified that values are same for previous and current.

Try with async as with REST api calls, you should use that.

 

Thanks

Sudhanshu

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Ramya,

It is not recommended to trigger API Calls from After business rule as per best practices.

instead you should use Async BR for this

please share BR configurations

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader