Knowledge article URLS opening in "New Window" as "Default"

Steph15
Giga Contributor

Hi Knowledge Managers!

My question is...does anyone have code to redirect URLS/hyperlinks typed with the article body to "default" the "Target" to open in a "New Window"?  The current Default is "None" and we've had issues across different browsers and operating systems with URLS NOT opening and simply redirecting to a ServiceNow Home page!

Thanks!

Steph

find_real_file.png

14 REPLIES 14

Aman Kumar S
Kilo Patron

1) Navigate to the UI Page "html_insert_link_dialog"

2) On the HTML field of this record scroll to around line 45/46 where it says:

<g2:ui_select_option text="${gs.getMessage('None (use implicit)')}" value="" selected="$[jvar_selected_target]" />

3) Change the value attribute of the line from:

value="" to value="_self"

*Value of empty and value of _self are the same. The reason why we're doing this is so the system will not default to this option. It will always default to an option that has value=""

4) Now pick any other option that you want to be the new default and move this to the top, replacing the position that "None (use implicit)" previously occupied. It should look like this:

5) Save the change and now when using the Insert/Modify Link functionality, it should now default to Target: 'New window (_blank)' (assuming this was the option you've selected to be the default)

 

Follow below link:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0682662

Best Regards
Aman Kumar

Hi Aman! Thank you so much! I'll look into this with our Developers!

Hi @steph

Any follow up needed?

Best Regards
Aman Kumar

Hi Aman,

Here at Duke we use the SDLC module to manage our Stories/Development. My Story has been updated with your response and will need additional discussion during our Scrum Developer meeting - IF - it gets picked up! I will keep you posted; however, this answer is the one I'm most interested in helping us with this issue. AND I will mark it as "correct" - at least for us - when I work with our Development Team.

Thanks again!

Stephanie