+ Start a Discussion

Adding cutom fields to Standard object threw metadata

You can add fields and lookup field in your standard object by going to Customize.


Example for a Contact object, you go to Customize->Contacts-> fields


Or you can "push" a standard object by the metadata like this one:



<?xml version="1.0" encoding="UTF-8"?><CustomObject xmlns="http://soap.sforce.com/2006/04/metadata"> <fields> <fullName>JobRequisition__c</fullName> <label>Job Requisition</label> <referenceTo>Job_Req__c</referenceTo> <relationshipLabel>Contacts</relationshipLabel> <relationshipName>Contacts</relationshipName> <type>Lookup</type> </fields> <fields> <fullName>Languages__c</fullName> <label>Languages</label> <length>100</length> <type>Text</type> </fields> <fields> <fullName>Level__c</fullName> <label>Level</label> <picklist> <picklistValues> <fullName>Secondary</fullName> <default>false</default> </picklistValues> <picklistValues> <fullName>Tertiary</fullName> <default>false</default> </picklistValues> <picklistValues> <fullName>Primary</fullName> <default>false</default> </picklistValues> <sorted>false</sorted> </picklist> <type>Picklist</type> </fields></CustomObject>


 The  issue we got is that Salesforce push back its own version to the IDE when we do a Save to server which is empty even if we can still see all the fields in the browser:

<?xml version="1.0" encoding="UTF-8"?><CustomObject xmlns="http://soap.sforce.com/2006/04/metadata"/>


 Then we might commit this version and then in the next org we won't be able to push this custom fields on the standard objects as the commited Contact object is empty.
Do you know why and can we provide this behaviour?