changes() and journal fields

SNAdmin47
Kilo Sage

We were troubleshooting a failing business rule and whilst the cause turned out to be unrelated to this topic we noticed this statement in the ServiceNow documentation:

=========================

GlideElement - changes()

Determines if the current field has been modified. This functionality is available for all available data types, except Journal fields.

=========================

Taken from the following location: https://www.servicenow.com/docs/r/api-reference/server-api-reference/c_GlideElementAPI.html

 

The thing is, we have numerous usages of comments.changes() in use on BRs and they work fine whether in a scripted condition or within the BR script itself. We tested again just to be sure that nothing has changed recently (although we noticed that this statement is in use on product documentation dating back to Washington), and whether on our company instance or the PDI our testing confirmed this works as intended with comments.changes() being effective.  

 

We considered that maybe this is saying that this method doesn't work with 'Journal' field types (i.e. notes, etc.) as opposed to 'Journal Input' field types (i.e. comments/work_note), but when we tested with a notes field which is a Journal type, then this worked as intended too. We also double checked and found multiple OOTB BRs using comments.changes().

 

I can't find anything online which indicates that comments.changes() is unsafe or considered as inadvisable for evaluating field changes (other than the above link). Can anybody explain why the documentation states this and/or give an insight into our perception of this statement?

 

More than anything, we'd like to ensure that our usage of this won't come back to haunt us with a later patch/version update and force us to find an alternative and frantically update essential BRs. I'm currently putting this down to an oversight on the documentation but thought it prudent to check. 

 

Many thanks in advance for any input you guys can provide! 😁

0 REPLIES 0