I have created custom field with Text data type..For some reason I need to change the field type to a look-up/master-detail relationship.

But when i click on "Change Field Type" button for that custom field, It's not showing lookup/master-detail relationship option.There is no records available in that object.

Can any one guide me how can i change that custom field type to lookup/master-detail.


1 Answer 1


You cannot do that, the only option you have is create an extra field, and afterwards process your lookup with a Execute Anonymous script or something.

The fact is that in your database, in the column of your Lookup Field, there isn't a Name stored for the record where the lookup refers to. In the lookup column you'll find an Id, that takes the Id of the object that the lookup refers to. There is no way salesforce knows how to convert a Text column to an Id Column, and that is why you cannot change form text to lookup.

You must log in to answer this question.

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