Ask Search:
david chengdavid cheng 

Invalid domain error when creating lookup field

I have a custom object called Course__c. This object already has two lookup fields to the Person__c custom object.  I am trying to create a third lookup field to Person__c in the Course__c object.

When I get to the last step and then click Save, I get an error "Validation errors while saving record(s). There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "invalid domain""

I have checked the object limits and I have not exceeded any limits.

I've opened a ticket with Salesforce support, but I'm curious if anyone has seen this before.
Best Answer chosen by david cheng
david chengdavid cheng
Found the problem - The Salesforce standard Person is appearing first in the picklist for lookup creation, and then comes my custom object label "Person".  This is even though person accounts are not enabled.

I'm not sure if this is new behavior, since the last time I setup a lookup field to Person was in early 2012.  I logged into my own dev instance and I see Person in the lookup creation picklist field.

Anyway, thanks for taking the time to check it out.

All Answers

Jeff MayJeff May
Are any of these objects part of a managed package?
david chengdavid cheng
Hi Jeff.  No, both objects were created by me.
Jeff MayJeff May
I was just able to do that OK with 2 simple custom objects.  Do either of your objects have other Lookup() or Master-Detail relationships?
david chengdavid cheng
Found the problem - The Salesforce standard Person is appearing first in the picklist for lookup creation, and then comes my custom object label "Person".  This is even though person accounts are not enabled.

I'm not sure if this is new behavior, since the last time I setup a lookup field to Person was in early 2012.  I logged into my own dev instance and I see Person in the lookup creation picklist field.

Anyway, thanks for taking the time to check it out.
This was selected as the best answer