- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @Veena-EeshB,
Have you added HTML code directly into the HTML canvas or via source code?
I have implemented a document creation and it works fine for template type as HTML template. I dont see any issues. I have created HTML code and built my document template. Your script is correct too.
Edit: assign the creation of template to a variable, not related to the issue but a good practice.
var result = new sn_doc.GenerateDocumentAPI().generateDocumentForTask(recordId, documentTemplateId, pdfName);
Regards,
Ehab Pilloor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @Veena-EeshB,
Have you added HTML code directly into the HTML canvas or via source code?
I have implemented a document creation and it works fine for template type as HTML template. I dont see any issues. I have created HTML code and built my document template. Your script is correct too.
Edit: assign the creation of template to a variable, not related to the issue but a good practice.
var result = new sn_doc.GenerateDocumentAPI().generateDocumentForTask(recordId, documentTemplateId, pdfName);
Regards,
Ehab Pilloor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thank you for the reply . My bad, I was coding html in html editor and not on source code. Thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi Ehab ,
I am going through another hurdle 'Document generation Api works from background script but not through HR flow or BR'. Can you please let me know your throughts
I have tested the document generation through background script -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago - last edited 2 weeks ago
Hi @Veena-EeshB,
You can tag me so that I get notification, I have used this code which works for me
var result = new sn_doc.GenerateDocumentAPI().generateDocumentForTask(
current.getUniqueValue(), // where to attach
"b28434fd9f4bc310092d88d86924abbd", // html template
documentName // file name
);
Regards,
Ehab PIlloor