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
Chris BenenatiChris Benenati 

Name field (of data type "Name") in Contacts standard object

I'm trying to use the Salesforce IDE plug-in with Eclipse to transfer a project from a production organization to a Developer workspace.  I pulled the necessary components from the production organization to my PC, but the attempt to deploy it to my Developer workspace failed. Most of the errors are related to the Name standard field of the Contacts standard object.

I have to transfer Contacts because of the customizations done on it. Contacts has a standard field "Name", which is of data type Name.  It looks like this: 
User-added image

I cannot find any documentation of this data type (if only because "Name" is so common that I get a million hits), but as seen above it appears to be a structure with multiple fields.  The error messages I get all have to do with not finding the  "Middle Name" field on the deployment destination.Sure enough, I went to the GUI in my Developer account, examined the Contacts object, and the Name structure does not include a Middle Name field.

Why this discrepancy in a standard object between the two environments?  How can I get around it?   BTW, we have custom objects and fields that explicitly reference the Middle Name field, so I would get errors even if I did not try to transfer the customized Contacts object.
Best Answer chosen by Chris Benenati
James LoghryJames Loghry
Chris, looks like the full name was added in Spring '15.  According to this success idea, you'll need to contact Salesforce support to enabled the full name.  I suspect you did this for one org, but not the others.  Go figure.  https://success.salesforce.com/ideaView?id=08730000000BqVVAA0

All Answers

James LoghryJames Loghry
The Name field is a standard field that exists on every org.  For contacts and users, it's a read only field that concatonates the First, Middle, Last names and also Saluation and Suffix.  If you don't care so much about migrating profile permissions, then it's completely fine to leave out of your package.xml / deployment script, as it should already be on your organization.  

Also, I just checked and it looks like "Middlename" and "Suffix" are marked as "Beta" for the Contact Name field here: https://help.salesforce.com/apex/HTViewHelpDoc?id=contacts_fields.htm&language=en (https://help.salesforce.com/apex/HTViewHelpDoc?id=contacts_fields.htm&language=en).

That leads me to believe, Salesforce has added these fields recently, and perhaps it's part your developer org, but not part of the org your deploying to.  One suggestion there is to go into the org you're deploying this to, and look for any critical updates (Setup->App Setup->Critical Updates or do a quick search for Critical Updates) that may turn the Middlename and Suffix fields on in your Contact records.
Chris BenenatiChris Benenati
Thanks.  That helps a lot.  But there are still some unexplained issues:
  • It's my Developer org that is missing the Middle Name field. (I am bringing code into it from a production environment for modification, after which it will be deployed to a new production org).
  • I just set up that Developer account in the last few months, whereas the Production org (which has Middle Name) has been functioning at least since last March.
  • I do not have any critical updates outstanding on the Developer Account (the path, BTW, is Setup->Build->Critical Updates).
  • Even if I leave Contacts.Name out of my migration, we have custom fields on custom objects that refer to Middle Name, so I will still get errors.
Chris BenenatiChris Benenati
So I created a brand new Developer account -- and the Contacts object does not have a Middle Name.
James LoghryJames Loghry
Chris, looks like the full name was added in Spring '15.  According to this success idea, you'll need to contact Salesforce support to enabled the full name.  I suspect you did this for one org, but not the others.  Go figure.  https://success.salesforce.com/ideaView?id=08730000000BqVVAA0
This was selected as the best answer
Chris BenenatiChris Benenati
Hey, thanks a lot.