hyper link in showFieldMsg on load client script

Alon Grod
Tera Expert

How can I add hyper link using onLoad client script and

 g_form.showFieldMsg

(for example the user will see 'click here' and it will redirect to google)

My field name is: u_priferia

table name: sn_slm_case

1 REPLY 1

Tanushree Maiti
Tera Patron

Hi @Alon Grod 

 

By default, ServiceNow's  g_form.showFieldMsg treats text as plain string and escapes HTML tags.

OOB it is not supported. 

You need to write an onLoad Client Script that pushes a placeholder message and dynamically updates the DOM element  ( DOM is not recommended).

 

Refer  for DOM onload script: 

https://www.servicenow.com/community/itsm-forum/need-help-in-adding-a-link-in-string-type-field/td-p...

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti