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?