Attachment file rename

busireddy
Tera Contributor

when i try to attach a attachment on incident form the attachment file name system has to check if it's vaild file name or not?

Name convention –

                Original_file_name+_+USERID+_+YYYYMMDD.original file Extension

 Example : ABCD_siva_20200506.docx

so kinldy help with the script

 

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Reddy,

have before insert business rule on sys_attachment table and condition as table name is incident

in the script check the file name and if invalid use current.setAbortAction(true)

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Gaurav Shirsat
Mega Sage

Hi bisireddyyou

This thread will help you

https://community.servicenow.com/community?id=community_question&sys_id=9435cb6ddbd8dbc01dcaf3231f96...

 

Please Mark Correct and Helpful

Thanks and Regards

Gaurav Shirsat