UI action to export specific section of Form to PDF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 07:56 AM - edited 10-30-2023 08:01 AM
Hello Community,
Is there any way to extract the Fields from the particular section of the form to PDF.
As anyone achieved this requirement. BY creating a new View and adding the fields and export to pdf is one solution. bu tplease let me know if there is any other solution apart from creating a view.
Thank you in advance.
Thanks,
Omkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 08:04 AM
Hello @Omkar Kumbhar
function export2PDF() {
var sysparm_sec = g_form.getSections('name of your section');
var sysparm_sys_id = g_form.getUniqueValue().toString();
var instanceName = 'https://my-instance.service-now.com/';
var url = instanceName+sysparm_sec + '.do?PDF&sys_id=' + sysparm_sys_id;
g_navigation.openPopup(url);
}
Plz mark my solution as Accept, If you find it helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 02:25 AM
Hello @Samaksh Wani ,
Thank you for your response! Unfortunately it is not Working. How you will add the sysparm section in URL. I searched in the Docs but i did not find anything related to sections we can sysparm it in URL. If you have any docs links please share.
Thank you,
Omkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 04:57 AM
Hello @Omkar Kumbhar
You can create a view of your section, which you can open it into the pop up.
Plz mark my solution as Accept, If you find it helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 08:04 AM
Hello @Omkar Kumbhar
If you want to know the name of your sections
.getSectionNames() is used.
Plz mark my solution as Accept, If you find it helpful.
Regards,
Samaksh