- 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
share your content within that template
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thanks for the reply Ankur. I was doing html coding in the html editor which is why it was behaving in such way , my bad. Thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Ankur ,
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 ,
Check the document template
In BR the template sys_id = “252abf1b938093509f4d3ddfebba10f6” but in the flow the Document template sys_id is “aa48beffc3c01790f521990c050131c8” and check if the template is belongs to “sn_hr_core_cftc_survey_answer”.
Kindly mark Helpful if the issue is fixed.
Regards
Sudhanva Chandra D
Certified ArchX || 8x ServiceNow CIS