The User is creating the Case record using REST API,

Here the user has access to the contact field in case object but he is not having access to the contact object.

wt could be the error message

closed as unclear what you're asking by Phil Rymek, Mark Pond, Samuel De Rycke, Sergej Utko, Simon Lawrence Mar 18 '14 at 11:02

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    Arjun, it's a bit unclear what your exact question is, could you update the question with more details ? – Samuel De Rycke Mar 11 '14 at 22:22

You'll get the same error as if the user did not have access to the field itself (INVALID_FIELD).

Here's the code I used to verify this result (Google Chrome console session while logged in as a user with no Contact object permissions):

var x = new XMLHttpRequest(), y = JSON.stringify({ ContactId: "00330000009NR5q", Status: "New", Origin: "Web" });
x.open('POST', '/services/data/v29.0/sobjects/Case'); 
x.setRequestHeader('Authorization', 'Bearer '+document.cookie.match(/sid=(.+?);/)[1]);
x.onreadystatechange = function() { console.log(this.response); }; 


[{"message":"No such column 'ContactId' on sobject of type Case","errorCode":"INVALID_FIELD"}] 

If the user has an ID to the contact record that they do not have access to and they try to put it in the contact field on the case they should get an "insufficient access rights on cross-reference id " error

This is only if the user has access to the Contact Object but not the specific contact record, either I misread the original post or it was edited to show they did not have access to the contact object. See SFDXFOX's response above

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