Make annotations visible for all the users and make annotation toggle icon and pop up message invisible

UPASANA2
Mega Expert

How do I make annotations visible for all the users and make annotation toggle icon and pop up message invisible?

11 REPLIES 11

The SN Nerd
Giga Sage
Giga Sage

You can toggle annotations in a client script by the following code:



SN.formAnnotations.show()



I would advise caution when using undocumented JavaScript; this code is not intended for general use (not supported).


Just because you can something doesn't do it doesn't mean you always should.



If you disable the annotation macro or the system property, the code above will do nothing,



You would then need to manipulate the DOM to hide the button.


I'm not going to provide the code as it is not best practice.



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Anurag Tripathi
Mega Patron
Mega Patron

You can use this system property



glide.ui.form_annotationsEnables (true) or disables (false) form annotations, which allow you to add Custom, Section Separator, and Line Separator to a form.
  • Type: true | false
  • Default value: true
  • Location: System Property [sys_properties] table
  • Learn more: Annotating Forms
-Anurag

That either enables or disables the annotations button and functionality entirely.



He want's annotations to show by default and disable the button.


If you disable it by the system property, the annotations never show, even using the code I provided.



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

The SN Nerd
Giga Sage
Giga Sage

If you want something to show permanently on the form, you might consider using for sections.



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022