link on the incident form based on condition

Bindhu1
Tera Contributor

Hi All,

I have a requirement where I have to add the link on top of incident form, clicking on which user must be redirected to list of records, this link should be visible only when state is in progress.

I tried this with annotation but unable to hide it on all other states, is there any other way to do this, kindly refer the below screenshots to check the created annotation.

Bindhu1_0-1758009056954.pngBindhu1_1-1758009089592.png

Thanks in advance

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Bindhu1 

that's correct. you cannot show/hide annotation based on script without DOM manipulation.

DOM manipulation is not recommended.

2 options

1) create a URL type field and add URL in that and then show/hide that using client script based on state

OR

2) use DOM manipulation, check below link

Hide Annotation with Client Script 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Hi Ankur,

After adding dom manipulation client script I am able to see this blank box is there any way I can avoid it.

Bindhu1_0-1758014021639.png

 

@Bindhu1 

you need to hide the complete box

check the HTML ID for that and use it correctly

If my response helped please mark it correct and close the thread so that it benefits future readers.

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