Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

API restrictions in OOB API for attachment

Devansh1
Tera Contributor

Hi all, 

 

We have global table for attachment and there are system properties for that as well from OOB, now we have extended the task table in our custom table and here we are using attachment which is globally. 

Now the requirement we have to manage the files being uploaded into our system through attachment api, we wants to allow some extensions like- pdf,png etc. if we are applying this to direct system property then it will change the properties for entire system. 

Is there any way how we can configure our api for desired results..

 

 

 

1 REPLY 1

RaghavSh
Mega Patron

@Devansh1 Try before insert BR on sys_attachment table.

On the basis of table and attachment extension, abort the insert using current.setAbortAction(true);


Please mark the answer correct/helpful accordingly.


Raghav
MVP 2023
LinkedIn