I have a custom field (type- Text(18) (External ID)) say Ext_ID__c on a custom object. We are using custom profile assigned to a group of users. For few users, Ext_ID__c is accessible, however for few users, this Ext_ID__c is not accessible. I checked the accessibility on User ID and its related Ext_ID__c through UserRecordAccess object.

We are using angular to display UI and Salesforce is being used to maintain database. We are using FeedItem to post chats and the Ext_ID__c is somehow related to the posts. When the users (who does not have access to Ext_ID__c) try to post anything, the data does not get saved on FeedItem and we get the error "INVALID_CROSS_REFERENCE_KEY".

Please suggest what could be the possible cause and how can we resolve this.

2 Answers 2


If the field is not visible to user you need to check field level accessibility and field level security. If checked and you are facing problem to access the record then you need to check OWD setting i.e sharing setting from setup and if the object is set to private.

  • Yes the object where Ext_ID__c exists is set to Private. But we cannot make it public. Can we do anything on FeedItem? Jun 22, 2017 at 11:08
  • you can write sharing rule with respect to condition and assign ot to public groups (group of user) or Role Jun 22, 2017 at 12:37

Change your controller definition

public class with sharing ClassName{

// Your code



public class ClassName{

// Your code


now you can able to save your records

Thank you Amol Salve Salesforce Developer

You must log in to answer this question.

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