function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Victoria Mette HvidbjergVictoria Mette Hvidbjerg 

Cannot complete challenge Creating Object Relationships - first error: FIELD_INTEGRITY_EXCEPTION. Why?

Hi
I was trying to complete the challenge Creating Object Relationships, but got a weird error. Does anybody know how to solve this, so I can get on with it?:

Challenge Not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, User: id value of incorrect type: 00558000000ta38AAA: [User__c]

RGDS
Vic
Ekta Gupta 11Ekta Gupta 11
Hi Victoria,

Can you provide which object your were trying to insert and exactly on which field you were populating User Id?

These kind of error comes when you populate the lookup field with the ID of record its not related to.
For eg:   An owner of an Account can only be a User or Queue and if you try to insert the Account with owner as group Id, it will throw this error.

Let me know if this helps you.