• Nikitha Edunuri 4
  • 0 Points
  • Member since 2017

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 1
I am trying to share a chatter document(Has AllUsers Visibility) via apex with a partner commuity user using the ContentDocumentLink object but, I am continuously thrown an error. I need to allow the community user to upload revisions of documents they did not create. Any ideas on how to do this? Code and error below:

Record I attempt to insert:
insert new ContentDocumentLink(
    ContentDocumentId = '069XXXXXXXXX',
    LinkedEntityId  = [Portal User Id],
    ShareType = 'C'

Error Received: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, 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.: [LinkedEntityId]
  • August 11, 2016
  • Like
  • 0