How to enforce "mandatory" requirement on an attachment field



It will not be possible to set a mandatory state on attachment fields because we navigate away from the record to attach the file. Clicking into the field will trigger the mandatory requirement and not allow you to navigate away to attach the image because the mandatory requirement has not been fulfilled.


A simple way to still enforce a mandatory requirement on this field would be to create an onSubmit catalog client script that looks into the sys_attachment table, and checks whether the request about to be submitted has an attachment associated. If not, alert the user and don't let the submission go through. 

Applicable Versions


Additional Information

This applies to fields such as "Video" and "Image"