You need to sign in to do that
Don't have an account?
Josh Summitt
How do i trigger an event when a Document is uploaded
Hello,
I need to run some operations when a file is uploaded via the Document tab. On other pages this is easy because i can trigger on Attachment or FeedItem, etc. I don't see a way to trigger when a file is being uploaded from Documents.
FYI i'm looking for someing like
trigger checkFile on Document(before insert){
}
Since document does not have a trigger function how can i check this before its completely uploaded to the database. I want to return an error if its not correct and prevent the file from being uploaded.
There's no way to override the Documents functionality - they aren't first class sobjects so you don't get visualforce overrides and the like.