1

Is there a way to share private chatter files to users who have access to given account? So I mean if users have access to account then they should be able to see and update those files but if users do not have access to given account then they should not see given chatter files.

==== Update: I have already found a way how to make visible those fields to user who have access to account, not sure if this allows them to collaborate, need to check

=====

No, it actually does not work; throwing an error

An error occurred during DML operation: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, You cannot create a link for a document in a personal libraries: [ContentDocumentId]

========

Ok, looks like users can access document by inputting its id, but those records are not returned in the query. Strange. Why?...

1 Answer 1

2

Looks like I have found some partial answer under similar posts.

First of all, as was mentioned here:

https://salesforce.stackexchange.com/a/7552/3716

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).

(http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_contentversion.htm)

So this means I have to either create collaboration chatter group and then include every users I need into that group and create ContentDocumentLink with ContentDocumentId which should be equal to my document and LinkedEntityId which should be equal to Chatter group Id and ShareType = 'C'.

Or I have to create bunch of ContentDocumentLink records with ContentDocumentId which should be equal to my document and LinkedEntityId matching each user Id I need and ShareType = 'C'.

You must log in to answer this question.

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