Attachments - Allow only submit PDF format attachment with Max 5 MB size ?

Venky Kshatriy1
Tera Contributor

How to Allow only Attachments In PDF format In Record producer ?

6 REPLIES 6

Muhammad Khan
Mega Sage
Mega Sage

Hi,

 

This doc might help you. 

Configure attachment system properties

What you have suggested is platform level change while here Venky only needs it for one record producer.

 

-Anurag

Anurag Tripathi
Mega Patron
Mega Patron

Hi, 

Check the question below, Ankur has answered a similar thing with CSV format. Will you need to tweak the script to suit your need but it gives the general idea

Check attachment file type-client script - IT Service Management - Question - ServiceNow Community

-Anurag

-Anurag

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

why not do this instead and suggest this as solution to customer?

1) use variable of type Attachment and add the extensions it supports as variable attributes

allowed_extensions=pdf

Types of service catalog variables

If you don't wish to use that then you will have to use DOM manipulation somehow to know the file names and then check if all of those contain .pdf or not

regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader