Question: I have following code which I am trying to execute in Console but failing with error below. 

CODE: 

```
Implementation__C I = New Implementation__C();
I =[select Account__c,ID, Name from Implementation__C where ID = 'Record ID'];
I.Account__c = 'Account record ID';
update I;

```

ERROR: 

> 
> Line: 4, Column: 1  
> 
>  System.DmlException: Update failed. First exception on row 0 with id a0j0V00000NaBYgQAN; first error: INVALID\_CROSS\_REFERENCE\_KEY, invalid cross reference id: []
> 
> 
>

Answer: 
Can you run this code at your console

```
Account acct = [SELECT Id, Name FROM Account WHERE Id='Account record ID'];
Implementation__C Impl = [select Account__c,ID, Name from Implementation__C where ID = 'Record ID'];
Impl.Account__c = acct.Id;
update Impl;

```
Account Ids all start with the prefix '001' the Id that you have listed in the error message is not an account Id 'a0j0V00000NaBYgQAN'. Are you sure you are not populating the account\_\_c with the Implementation\_\_c.Id instead of the account?