You need to sign in to do that
Don't have an account?
arun sfdc
Hi Guys, I have requirement to set the limit for uploading a file in salesforce
I have requirement like this, user can upload only one file from related list of files.
if user trying to add more than one file he will get an error like can't upload more than one.
Please give me answers as soon as possible.
Thanks advance...
if user trying to add more than one file he will get an error like can't upload more than one.
Please give me answers as soon as possible.
Thanks advance...
You can write a before trigger on Attachment object and check whether there are already any attachments under your parent record. If there are attachments already present, then use addError method to stop the upload.
Similar example is provided at the link (http://www.sfdcpoint.com/salesforce/trigger-on-attachment-in-salesforce/)
Please mark this as the best answer if it resolves your issue. Thanks.
I was asked about files object not attachement object and give me advice for this. please