Restrict user from submitting attachment other than pdf file

Sakeena Fathim1
Tera Expert

Hi Team,

Greetings!!

I have a requriment where i need to restrict a user to upload a document other than PDF like xslx,xml,txt. User wants only pdf file to be upload for one specific catalogue item. I went through the community but unforunently i didn't find such article. If anyone knows about it please lemme know thanks in advance.

Note: Onsubmit client script I can not do glide record on "sys_attachment" table as best practice by my client. 

Thanks

Sakeena Fathima

9 REPLIES 9

Kieran Anson
Kilo Patron

Should they only be able to attach a single attachment? If so, you can disable attachments for the item, and then use an attachment variable with the allowed_extensions attribute to restrict to just pdfs.

yes they will able to add attachment which is OOB. If i disable that then it will impact other as well

Harish KM
Kilo Patron
Kilo Patron

Check this https://community.servicenow.com/community?id=community_question&sys_id=47164f61db1cdbc01dcaf3231f961904

Regards
Harish

Yup i saw this solution but in my client environment we weren't able to glide on Onsubmit client script so this was not help full for me actually.