I have a requirement to implement several file fields for a Custom Object, however as far as I know you cannot create 'file fields' and detect if they are null/not null and use them in business logic. What I would like to express is that certain attributes cannot obtain a certain value unless two files have been uploaded by them

Is there any workaround ?


Well, I would create two fields on the UI, both checkbox. (File 1 Uploaded and File 2 Uploaded)

Then a custom interface where user uploads those files using the standard file upload component.

When the user uploads the files, I would mark corresponding checkbox a true.

Also, I would write a validation that if those two fields are not true, do not let a user update some specific attributes.

Other things to take care of

  • Do not let people upload files from standard UI.
| improve this answer | |
  • How do you disable it? Thanks – Edmondo1984 Apr 24 at 20:57
  • If you are talking about files upload from standard UI, I would remove the files related list from the UI – manjit5190 Apr 25 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.