
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 06-28-2022 10:57 AM
Hello,
I had a requirement to provide Export to PDF option in Incident form in agent workspace with excluding few fields and related lists. Though export option is available in native UI without modification but export option itself was not available in agent workspace.
So I read few links in community which provided me hints about implementing this solution about providing Export to PDF option along with excluding fields, related lists which I don't want as part of export.
Here are the steps to achieve this.
1) Create new view in Incident form and add fields accordingly which you want to see in 'Export to PDF' view and save it.
2) Now Change the view to 'Export to PDF' and go to related list and remove all, Once done save it and see form in 'Export to PDF' view will not have fields and related lists.
3) Now create one New UI action with a name 'Export to PDF' and make sure this is available only in Workspace but not in Native UI, follow below configuration
Code :
function onClick(g_form) {
var url = '/' + g_form.getTableName() + '.do?sys_id=' +
g_form.getUniqueValue() + '&sysparm_view=export_to_pdf&PDF';
top.window.open(url, '_blank');
}
3) If you observe above code I have added View which I created 'pdf_export' and also added 'PDF', this will make sure when agent clicks on button, record will be downloaded as PDF but with 'pdf_export' view instead of 'workspace' view.
And with this I was able to add Export functionality along with excluded the fields and related list which I do want in PDF export.
4) Lastly go to agent workspace, Open Incident and click on button it will download PDF.
Please hit like or bookmark the Article in case that's helpful.
Feel free to correct me in case Article needs modification.
Best Regards
- 5,504 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks for the article!
I didn't have the "Format for Configurable Workspace" checkbox available, but your explanation still helped me figuring out the solution. Subscribed. 🙂
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Worked like a charm for scoped app as well!
Nice work! ❤️

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Eivind Sandnes Thank you 🙂
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
What if we want to keep this in Standard ticket configuration Tab?
Do you have any solutions?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Musab Rasheed - How can we make it work if we have dependent fields? For eg: the PDF displays all the fields in that current view even if that field is not on the form because it is a dependent field. How do we cater that scenario to only show dependent field when they are being set?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
hi @Musab Rasheed, there are some attachments in the related records. can you please suggest a way to capture that too in the pdf
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Musab Rasheed ,
I am trying to get the Attachments as well from all the Related list records. Could you please help me on the same how we can fetch and place the names on the pdf which we are exporting.
Do we have that feasibility?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
the button is not showing in my HR AGENT WORKSPACE