link UI action from catalog variables
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 09:23 PM - edited 08-01-2023 09:35 PM
Hi All
I have created a Button called print on the request item table so when a user clicks on it this will generate a pdf as sc_req_item(1) but now I want to replace the name with the Name of the variable from the catalog item using below script.
Script:
function exportPDF() { var sysparm_table = g_form.getTableName(); var sysparm_sys_id = g_form.getUniqueValue().toString(); var a='https://xxx.service-now.com/'; var url = a+sysparm_table + '.do?PDF&sys_id=' + sysparm_sys_id; g_navigation.openPopup(url); }
Thank you
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 10:21 PM
Hello @Deep_D
Add this :-
var file = "Name of the Variable";
current.file_name=file;
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh