• Sam Mohyee 8
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies
I'm posting here in an effort to get what is clearly a gap/bug in functionality some attention. I tried the route of Salesforce support, but as always it was a frustrating weeks long process that ended with them suggesting I post an Idea to the IdeaExchange so it can remain unacknowledged for 3-5 years. 

Issue:  It is possible to upload a file to Chatter Files in a way that doesn't activate any triggers.

Ways to upload a file to chatter:
  1. 'Upload Files' link on the 'Files' tab
  2. Create a new Chatter post, using the 'File' post type
  3. Comment on an existing Chatter post, and use the 'Attach File' link

2 of these methods fire a trigger: 
  1. A trigger on ContentVersion will fire for uploads directly to the File Tab
  2. A trigger on FeedItem will fire if the file is uploaded on a File chatter post

However, it is possible to upload a file through a Chatter comment without firing any trigger!

Even if a trigger is in place on FeedItem, this trigger will only fire upon submitting the comment as a whole - it is possible to upload the attached file to a comment before the comment is even submitted!

Steps to replicate (upload to Files without firing a trigger):
1. Find a chatter post you can add a comment to.
2. Click the 'Attach File' link and select a file
3. An upload progress bar will complete - this is the point where a trigger should have fired!
4. Don't press the 'cancel' link on the attached file. So long as this isn't pressed, it doesn't matter whether the comment is actually posted or not.
5. Now go to your Files tab: voila, the comment's attached file was uploaded, even though the comment was never posted!

User-added image

Again, no trigger is fired on any object when a file is uploaded using this method. Clearly the file upload should not be allowed to complete until after the comment is posted, but this is not the case.

Am I going crazy here, or is this clearly unexpected behavior that needs to be fixed? Why am I having such a hard time trying to get Salesforce to acknowledge this is a real issue? 

 
I'm posting here in an effort to get what is clearly a gap/bug in functionality some attention. I tried the route of Salesforce support, but as always it was a frustrating weeks long process that ended with them suggesting I post an Idea to the IdeaExchange so it can remain unacknowledged for 3-5 years. 

Issue:  It is possible to upload a file to Chatter Files in a way that doesn't activate any triggers.

Ways to upload a file to chatter:
  1. 'Upload Files' link on the 'Files' tab
  2. Create a new Chatter post, using the 'File' post type
  3. Comment on an existing Chatter post, and use the 'Attach File' link

2 of these methods fire a trigger: 
  1. A trigger on ContentVersion will fire for uploads directly to the File Tab
  2. A trigger on FeedItem will fire if the file is uploaded on a File chatter post

However, it is possible to upload a file through a Chatter comment without firing any trigger!

Even if a trigger is in place on FeedItem, this trigger will only fire upon submitting the comment as a whole - it is possible to upload the attached file to a comment before the comment is even submitted!

Steps to replicate (upload to Files without firing a trigger):
1. Find a chatter post you can add a comment to.
2. Click the 'Attach File' link and select a file
3. An upload progress bar will complete - this is the point where a trigger should have fired!
4. Don't press the 'cancel' link on the attached file. So long as this isn't pressed, it doesn't matter whether the comment is actually posted or not.
5. Now go to your Files tab: voila, the comment's attached file was uploaded, even though the comment was never posted!

User-added image

Again, no trigger is fired on any object when a file is uploaded using this method. Clearly the file upload should not be allowed to complete until after the comment is posted, but this is not the case.

Am I going crazy here, or is this clearly unexpected behavior that needs to be fixed? Why am I having such a hard time trying to get Salesforce to acknowledge this is a real issue?