+ Start a Discussion
JackShepardJackShepard 

How to get custom fields list with describeSObject

I am using describeSObject to get the fields list of the object "contact".

 

However, while I have created some custom fields in the contact object, these custom fields don't appear in the fields list returned when looping on the fields property.

$fields = $mySforceConnection->describeSObject('contact');

foreach($fields->fields as $value){
	echo $value->name.' '.$value->label."\r\n";
}

 When doing so I get all the default contact object fields, but not the custom fields I created for the object.

 

I can't find what I am not doing right, any idea?

 

Thanks in advance for your help.

Sonam_SFDCSonam_SFDC

The custom fields you have created - are they visible on the Contact Page Layout?

If not, try adding them to layout and make a describe call after that :

 

Read more: http://salesforce.stackexchange.com/questions/4674/custom-field-is-not-visible-editable-after-creation-professional-edition