2

Well, the title says all, I need to retrieve all available fields of leads? how can that be done using developer tools for .net?

1 Answer 1

0

Establish a Session against the Partner API and then use the describeSObject() to extract the information about the "Lead" sObjectType.

From the DescribeSObjectResult the getFields() method will have the Field information you need.

Here you can see (a slightly modified version) of the resulting data bound to a PropertyGrid.

Lead fields from the Partner API

You can also get this data from the REST API and Metadata API.

4
  • Do you know if I can do it without this API as our company didn't want to use wsdl as they are too static?
    – Vilius
    Commented May 22, 2015 at 6:12
  • @Vilius The Partner SOAP API isn't static with regards to the metadata about objects. If, for example, you add a new field to Lead, it will be immediately available via the Partner API. The are also REST versions of the API, if you prefer. You are still seeing exactly the same meta data. Commented May 22, 2015 at 8:29
  • Well I thought about using Rest API, but I will reconsider you option. Plus I wasn't clear, our client has more than one salesforce environments so their fields may differ, that's why I needed more dynamic way. When I'll choose solution I'll approve your answer
    – Vilius
    Commented May 22, 2015 at 8:36
  • The Partner API was designed specifically for the scenario you describe. Accessing multiple Salesforce environments with different schemas. I use it it the FuseIT SFDC Explorer to extract sObject meta data about fields and to run dynamic SOQL queries. Commented May 22, 2015 at 18:57

You must log in to answer this question.

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