Hide Annotation on the change form

Adarsh T
Tera Contributor

Hi

I have a requirement to hide the annotation message that pops up in the change form under schedule tab stating:

Planned start date and Planned end date are the requested change window

This needs to be hidden if the type of the change is retrospective. Tried multiple ways in client script but not getting hidden in the form.

if (g_form.getValue("type") == "retrospective") {

             var elem = document.getElementById("section-ee95827dc0a8016400f6e15e01fc13ed");
             var annotations = elem.getElementsByClassName("annotation-wrapper");
             annotations[0].style.display=none;

}

Attaching the OOB annotation config:

Please help me with the solution.

1 ACCEPTED SOLUTION

Sagar Pagar
Tera Patron

Hi,

Just move annotation text to Available slush bucket(left side).

 

find_real_file.png

Thanks,

Sagar Pagar

The world works with ServiceNow

View solution in original post

3 REPLIES 3

Aman Kumar S
Kilo Patron

Hey,

Did you set set isolate script as false, if it is not present on the form, bring that on form layout in client script.

 

Alternatively, You can follow below article to achieve the same:

Hide Annotation based on condition

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar

Hey,

Was your requirement to remove the annotation altogether or only based on condition when type is retrospective?

Best Regards
Aman Kumar

Sagar Pagar
Tera Patron

Hi,

Just move annotation text to Available slush bucket(left side).

 

find_real_file.png

Thanks,

Sagar Pagar

The world works with ServiceNow