1

I am facing INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY while creating CaseComment object with external id CaseNumber for Case parent object. I am using the profile with "Partner Community" user licence and profile is configured to access Case and CaseComment objects.

{  
    "Parent" : 
    {
        "CaseNumber": "16896151"
    },
    "CommentBody" : "Comment string here"
}

The above results in error,

[
  {
    "message": "insufficient access rights on cross-reference id",
    "errorCode": "INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY",
    "fields": []
  }
]

Also unable to retrieve record using external ID, the following GET

/sobjects/Case/CaseNumber/16896151

fails with below error.

[
  {
    "message": "insufficient access rights on cross-reference id",
    "errorCode": "INSUFFICIENT_ACCESS"
  }
]

Interestingly, for the same profile I can query the ID from CaseNumber for the Case object

/query/?q=SELECT ID From Case Where CaseNumber = '16896151'

and I can create CaseComment with ParentId.

{  
    "ParentId" : "500q00000039YSf", 
    "CommentBody" : "Comment string here"
}

results in success.

{
  "id": "00aq0000000AefCAAS",
  "success": true,
  "errors": []
}

Could someone please let me know if there's any particular profile configuration I need to make to achieve the cross reference successfully. I do not want to make two calls when it can be achieved with a single call.

More findings: This can be simulated with "Salesforce" user licence as well. By revoking "View All" access for Case object under Standard Object Permissions. Does this mean "View All" is mandatory for cross referencing on external id? Since "View All" is not available for "Partner Community", cross reference will never be possible on external id?

  • did you finally get a clue on this? We are having similar issue. We use this pattern: { "field_reference__r" : { "external_id_field__c" : "SomeValue" } } This works OK with a System Administrator user but using a partner user it gives the INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY error. – user28659 Feb 10 '16 at 11:33
  • No solution in place. We had to lookup the ID using CaseNumber and then use ID to create CaseComment object. – Sripathi Acharya Feb 11 '16 at 12:47
0

My guess is that your PATCH is not configured correctly rather than the json body. Have you taken a look at using the REST API for upserts so that the External Id is available for use?

Doc: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_upsert.htm

  • I am creating CaseComment object with existing Case object as Parent, for this scenario I do not think I can use the upsert. Anyway I tried using upsert to update the Case object with external id, but like the GET with external id this request also failed with INSUFFICIENT_ACCESS error. – Sripathi Acharya Jul 27 '15 at 7:49
  • Okay, this sounds like a permissions/access issue then. Check if the REST class has "without sharing" or "with sharing" tagged on it (If "with sharing" or neither of the two options you need to ensure sharing rules are setup correctly for the calling user). Also, you need to ensure that the user you are making the REST call with has Edit access to the Case object. – techbusinessman Jul 27 '15 at 16:01
  • I tried to simulate with "Salesforce" user licence profile instead of "Partner Community" and here's what I found. After giving "View All" data administration under Standard Object Permission to Case object I am able to create case comment with cross reference to case object. Now this setting is not available for "Partner Community", does this mean Cross reference is not possible at all? – Sripathi Acharya Jul 28 '15 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.