- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 03:20 AM
Hi all,
I have a requirement, in which i have to give the hyperlink for another catalog item. On change catalog client applies to variable set. I should get the hyperlink in error box.
I could not able to achieve this in UI page/ Macro/ widget, because this is MVRS.
How can we achieve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 08:36 AM - edited 06-20-2024 08:58 AM
@Suvedha Vignesh Please find the syntax below used for onChange client script with 'newValue' details.
var urlString = '<p><a class="web" target="_blank" href="' + "/incident.do?sys_id=" + newValue + '">' + "Click Here" + '</a></p>';
g_form.addInfoMessage('Your Incident is already escalated If you want to know more ,please click' + urlString);
For testing purpose used the script in onLoad catalog client script by passing the generic url and the resulted as,
Info Message :
Error Message :
Reference : https://www.servicenow.com/community/developer-forum/how-to-give-link-in-alert-box-using-client-scri...
Please mark this as helpful and accept it as a solution if this resolves your query.
Thanks,
Sujatha V.M.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 08:36 AM - edited 06-20-2024 08:58 AM
@Suvedha Vignesh Please find the syntax below used for onChange client script with 'newValue' details.
var urlString = '<p><a class="web" target="_blank" href="' + "/incident.do?sys_id=" + newValue + '">' + "Click Here" + '</a></p>';
g_form.addInfoMessage('Your Incident is already escalated If you want to know more ,please click' + urlString);
For testing purpose used the script in onLoad catalog client script by passing the generic url and the resulted as,
Info Message :
Error Message :
Reference : https://www.servicenow.com/community/developer-forum/how-to-give-link-in-alert-box-using-client-scri...
Please mark this as helpful and accept it as a solution if this resolves your query.
Thanks,
Sujatha V.M.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 08:30 PM
Hi Sujatha,
Thanks for the reply.
Is there a way can we get this Click here in first line, rather than it goes to secondline.
Thanks,
Suvedha.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 09:17 AM
Hi @Suvedha Vignesh ,
Try something like the following:
1) Create a UI page and lets call it Link. Your UI page just need to have the following on its html field:
<a href="catalog_home.do?sysparm_view=catalog_default">Link</a>
2) Create a catalog variable of type UI Page and reference your recently created UI page Link
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful."
Thanks & Regards,
Sumanth Meda