UI Action -Print to PDF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2023 10:52 PM
Morning Team,
W have a requirement to Create a UI action to PRINT To PDF, I have done something but not getting expected result .
Could you Please help me with it .
script is
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2023 02:44 AM
Hi @pramn
Can you capture a screenshot about what you have done so I can see what's going on?
It's totally working fine from my end.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2023 02:54 AM
Please check the screen shot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2023 02:58 AM
Hi @pramn
We should put these line scripts into a function. Use the below one
function printPDF(){
var uri = g_form.getTableName() + '.do?sys_id=' + g_form.getUniqueValue() + '&PDF';
g_navigation.open(uri);
}
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2024 11:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2023 03:31 AM
HI @pramn ,
I trust you are doing great.
Please try below script for the same
function print_to_pdf() {
var url = '/' + g_form.getTableName() + '.do?PDF&sysparm_record_target=' + g_form.getTableName() + '&sysparm_record_id=' + g_form.getUniqueValue();
window.open(url, '_blank');
}
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi