0

We are trying to create a custom field on lead object using metadata api, But it fails with the error "INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY". We have checked the permissions for the respective profile , we see below permissions are already provided

"Modify Metadata Through Metadata API Functions " "Create,Delete,Update,Modify All on Lead & custom objects" "Manage Leads"

Any permission or any custom setting that could create this issue ?

Thanks in advance

1 Answer 1

1

Couple questions, really. First, is it really saying "EREREFERENCE", or was that a typo of "REFERENCE"? If it's really saying the first one, that's probably something you should be taking up with the company's support team (and probably eventually their developers).

Second, programmatically creating an entirely new field, as opposed to filling in the contents of a manually-created field? How often is your schema changing?!

If the answer to both questions is the second option, then your question is the same as this one: How to fix insufficient access rights on cross-reference id?

In case you don't want to follow the link to the full answer, I'm copying the short version below:

Make sure that:

  • you don't insert/update a record that does not exist,
  • you don't update object field that is build-in/read-only,
  • you perform the action using a user who has the right access to modify the object
1
  • Thanks @Stephen Voris for the help here ... EREREFERENCE was a typo . Sorry about that . Regarding 2nd questions this field creation is just one time process that is done as part of set up , Instead of creating manually or through package we use programmatic way . I have cross checked the list specified in salesforce.stackexchange.com/questions/5546/… , all these check are fine in our case Commented Feb 24, 2023 at 6:37

You must log in to answer this question.

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