CustomMetadataLoader icon indicating copy to clipboard operation
CustomMetadataLoader copied to clipboard

Invalid Cross Reference Key

Open JodieM opened this issue 7 years ago • 3 comments

I'm trying to import data that has a lookup to another Metadata type. I am getting the error.

Error occured processing component ChildObject.NameOfRecord. In field: ParentObject__c - no CustomMetadata named ParentObject.Name found (INVALID_CROSS_REFERENCE_KEY).

The importer requires ParentObject__c to be there, and I've set the ID of the Parent Object as the value in the column ParentObject__c, but that's causing the error.

How do I import child CMDT object records?

JodieM avatar Apr 25 '18 10:04 JodieM

+1 I am getting the same error tried with both parent object ID and fully qualified name.

guenthmn avatar Apr 26 '18 15:04 guenthmn

I was getting the same error, but it worked when I used the DeveloperName of the parent custom metadata type instead of the Id

thebrettbarlow avatar Sep 18 '18 20:09 thebrettbarlow

I was getting the same error, but it worked when I used the DeveloperName of the parent custom metadata type instead of the Id

This answer helped me. New learning :-) Custom Metadata requires DeveloperName, not IDs 😄

yasarshaikh avatar Jun 14 '21 09:06 yasarshaikh