- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 07:26 AM
Hi All,
I am able to get the sys id of the attachments associated with the KB Article and i am populating the sys id of the article in the HTML filed but i want the link to be populated . Can you please Provide me the HTML script to populate that sys id of the article as URL in the filed .In the sys id filed i need a url link like "Click here to download " insted of sys id. .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 12:52 PM
You will need to create some sort of functionality to generate an appropriate URL for the sys_ids you are returning. You could do something like this.
var attachmentID = 'SOME_SYS_ID'
var attachmentURL = gs.getProperty('glide.servlet.uri')+'nav_to.do?uri=sys_attachment.do?sys_id='+attachmentID;
var urlDisplayValue = 'Click here to download attachment...';
// This is the code we need to insert into the HTML field.
var clickableURL = '<a href="'+attachmentURL+'">'+ urlDisplayValue +'</a>'
Once you have the 'clickableURL' value, you then need to insert that value into your HTML field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 12:52 PM
You will need to create some sort of functionality to generate an appropriate URL for the sys_ids you are returning. You could do something like this.
var attachmentID = 'SOME_SYS_ID'
var attachmentURL = gs.getProperty('glide.servlet.uri')+'nav_to.do?uri=sys_attachment.do?sys_id='+attachmentID;
var urlDisplayValue = 'Click here to download attachment...';
// This is the code we need to insert into the HTML field.
var clickableURL = '<a href="'+attachmentURL+'">'+ urlDisplayValue +'</a>'
Once you have the 'clickableURL' value, you then need to insert that value into your HTML field.