We have VF page that allows a user to upload an attachment that we later convert to FeedItem. THe VF Page also allows updating the FeedItem by inserting a new ContentVersion.

The whole thing works fine in our dev org. We have created a managed package out of it and installed it to another Enterprise edition org. The same thing however doesn't works in Enterprise edition.

Instead of updating the FeedItem, the code is creating a new Feed. We have also found that query to ContentVersion based is not returning any values.

Can you give an idea what might be causing this issue?

  • does you user have Salesforce Content User Permission?
    – doga
    Nov 16, 2012 at 3:18

2 Answers 2


You can query the Contentversion to get the files posted on the Object. But before you can do this, you must make sure the files are shared to your API user or to the company.

This is because the access control of ContentVersion is a little different with others. see doc,


Users (including users with the “View All Data” permission) can only query files they have access to, including:

All Salesforce CRM Content files in libraries they're a member of and in their personal library, regardless of library permissions (API version 17.0 and later).

All Chatter files they own, posted on their profile, posted on groups they can see, and shared directly with them (API version 21.0 and later).

Therefore, even a user with “View All Data” permission and can browse the files in the interface; if the files is not shared to him, he still can't query the files by API.


I don't think you can update FeedItem, in the documentation, it's not an updatable() object.

That being said, it's interesting that you were able to do it in your 'dev' org unless you were confused. The managed package shouldn't have much to do with the functionality of the code, unless your using a @RemoteAction or some other client-side script that requires a namespace prefix?

  • No that's not the issue. we are not updating feeditem, we insert feeditem and then update ContentVersion object. Sep 26, 2012 at 6:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .