Skip to content

Commit be044e6

Browse files
authored
Adding PDF generation for incident links
Implement PDF generation for incident links using RecordToHTML utility.
1 parent a8a4ba1 commit be044e6

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
var recordToLinkUtil = new RecordToHTML("incident", "1c741bd70b2322007518478d83673af3",
2+
"incident: ${number}-${short_description}",true);
3+
4+
//Adding link as html
5+
var html = '<h1>Incident Link is genearted</h1>\n' + recordToLinkUtil.toString();
6+
7+
8+
9+
var fileName = 'Test File with RecordLink';
10+
var tableName = 'incident';
11+
var recordSysId = "a623cdb073a023002728660c4cf6a768";
12+
13+
// Generate PDF and attach
14+
var pdfResult = new sn_pdfgeneratorutils.PDFGenerationAPI().convertToPDF(
15+
html,
16+
tableName,
17+
recordSysId,
18+
fileName,
19+
''
20+
);

0 commit comments

Comments
 (0)