How to make all reference link to open in a new window by default?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 11:23 PM - edited 02-29-2024 12:22 AM
I have a custom table u_mytable. It has a HTML field and when a user links a text in this field, can it be set to open automatically in a blank window. I am aware we can use the following:
but I want to make it default if the user forgets to do this.
Also, I have previous articles where the it was not specified how to open the links. Is there a way to change this to open in new window (instead of going into each article and manually changing it.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 11:47 PM
Hi @vidhya_mouli,
I searched for your problem I got one similar question in community you can take reference - " https://www.servicenow.com/community/developer-forum/helsinki-service-portal-icon-link-new-tab/m-p/1... ".
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 11:57 PM
Hi @vidhya_mouli ,
You can set the attribute of that field.
action.setRedirectURL(rec);
For more reference, you can go through this link: https://docs.servicenow.com/bundle/vancouver-api-reference/page/app-store/dev_portal/API_reference/A...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 12:10 AM
If my understanding is correct, this one will specify which page it will be redirected to. However, I am looking to open the link in a new tab. Not sure how to use this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 12:13 AM
Hi @vidhya_mouli ,
Then, please provide the attribute as target: _blank. I am sure it will work.
Please mark the helpful and accept the solution if it is really works from you.