You need to sign in to do that
Don't have an account?

Chatter Feed Item and Attachment + insufficient privileges error
I am having trouble inserting a list of chatter feed items of type 'ContentPost'. These feed items are being dynamically created for a list of contacts/campaign members (post.ParentId = 'contact id goes here') associated to a campaign; as well as the campaign itself. While I am iterating over the list of contacts I am also creating an attachment for each of them then
associating this attachment to the feed item. Both Attachments and Feed Items are added to separate lists then post for loop are inserted into the database.
I am able to successfully insert the chatter feed items (as text post posts, not content) if I don't associated the attachments, however when I associate the attachment body to the content data field of the feed item I get the following error:
Insert failed. First exception on row 0; first error: INVALID_ID_FIELD, You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.: []
I am running this as a system administrator on our dev sandbox, so I'm not sure what is causing this insufficient privileges error. I would appreciate any help on this, and if needed I can provide a more technical description with code snippets of the logic.
In the system admin profile do check the following:-
It is checked. I have been able to insert chatter feeds (FeedItem) objects from a list, the issue occurs when I try to add an attachment to it. The following code snippet explains the issue a bit more. The pdfBody variable comes from the URL of a visual force page rendered as PDF. Prior to inserting the FeedItem I create an Attachment with the same visualforce page and that is generated and attached to the campaign without an issue.
We are having the exact same error in a slightly different context: while trying to attach a ContentPost that belongs to a case to another case (that is a clone of the first case).
Hi,
Can any one of you please advise , i am trying to move chatter files from one org to other, what is the best way of doing this?
--yvk
I have the same problem, we access Chatte file from Java
i do have the same issue. i am working on the same. once i am done with this i can able to give you the updates.
use work bench to verify your Attachment Id.