We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How does this dynamic annotation work?

aaron47
Mega Guru

Hello,

This relates to the change_request form.

On my Paris developer instance, I can see there is an annotation that has this text:

${new ChangeRequestDateMessage(current).getDateMsg()}

 

find_real_file.png

 

Which is rendered as follows:

find_real_file.png

 

 

I was unable to find any reference to this on the internet.  Infact I couldn't find anything about dynamic annotations which I didn't realise was possible until now.

I am trying to debug this as it is no working on my company's instance, the text comes out empty:

find_real_file.png

 

Does anyone have some tips with how to debug this?

1 ACCEPTED SOLUTION

AnirudhKumar
Mega Sage

ChangeRequestDateMessage is the name of a script include.

Go to the Script include table and search for it.

 

Once you find it, you should look for the specific function with name getDateMsg

View solution in original post

7 REPLIES 7

Thank you! I actually ended up recreating this after trying a few things. The annotation updated when the form was refreshed. It was quite handy.

Hi everyone,

We have similar code in the instance but still the issue persists. Is there any additional settings/code changes that need to be done , please let me know?

MS25
Mega Sage

gs.getMessage not working for annotations on Agent Workspace - Known Error

 

This problem has been identified as a future possible product enhancement. You can subscribe to this Known Error article by clicking the Subscribe button at the top of this article to be notified when more information becomes available.