Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Client-Side Components/UI Actions/Generate PDF/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Description:
This UI Action enables users to generate and download the current record in PDF format. It is particularly useful in the Incident table for PIR (Post-Incident Review) documents after resolution.

Pre-requisite:
A dedicated form view must be created containing all relevant fields such as Resolution Code, Resolution Notes, Assignment Group, Assigned To, and others required for comprehensive reporting.
In this code, I've used the view name called 'pdf_export' which is already created in the Incident table
10 changes: 10 additions & 0 deletions Client-Side Components/UI Actions/Generate PDF/Script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// UI Action: Generate PDF
// Table: Incident
// Condition: current.state=='6' //Resolved
// Onclick: generatePDF();
// sysparm_view = pdf_export
function generatePDF() {

var url = '/'+g_form.getTableName() + '.do?sys_id=' + g_form.getUniqueValue() + '&PDF&sysparm_view=pdf_export';
top.window.open(url, '_blank');
}
Loading