Document Templates

Sangeetha Naga1
Tera Contributor

Hi All,

I have a query on the document templates. There is an existing template on the sn_doc_template table. The requirement is to modify the logo image, and in order to do that added an attachment to the template. But user added 2 more images and tried modifying that. But now we would like to remove those extra attachments which is of no use. Surprisingly there is no option available to remove those attachments. So is there any way to remove the attachments?

Kindly advise me on the possible ways to achieve this!!
Refer to this link: https://docs.servicenow.com/bundle/tokyo-employee-service-management/page/product/human-resources/ta...

 

Thanks in advance,

Sangeetha N

7 REPLIES 7

Benjamin A
Mega Sage

Hello @Sangeetha Naga1,

 

To delete the attachments on the record

 

1. Open the record

2. Click the Manage Attachments button (paper clip icon) in the banner

3. Select the attachments you want to delete

4. Click Remove

Sangeetha Naga1
Tera Contributor

@Community Alums  Could you pls help me with your inputs here? I tried deleting those attachments using a bg script as well, but no luck. Kindly share your suggestions here!!

 

Ramu Neelam
Giga Expert

Hello Sangeetha,

The document templates that you are referring are part of the table “sn_doc_html_template” which extends “sn_doc_template” table. In the OOTB configuration there is no delete ACL configured for the table “sn_doc_html_template”. This is the reason you are not able to see the “Remove” button when you click on the “Manage Attachments” link.

 

If you introduce the delete ACL then you can delete these attachments. Once you delete the unwanted attachments then delete the ACL and make sure you didn’t promoted the ACL to QA or PROD. Attaching the Images/logs to templates not always works. It works properly in DEV but the PDF generation in QA and PROD will not load the image into the generated PDF file. We have faced this issue in one of our BCM implementations. So, it is better to upload your image to System UI > Images and refer the image in the PDF Generation html. My team faced this issue, and this is how I resolved the issue.

 

If this explanation resolves your issue, then please hit the Thumb Icon and mark as Correct!!

 

Thanks,

Ramu Neelam

Hi @Ramu Neelam ,

 

Thanks for sharing detailed inputs!! I'll try this and get back to you. 

 

Thanks,

Sangeetha N