I need to retrieve records of Lead based on lead id,then I used retrieve() in salesforce Soap api and it shows error

{"INVALID_FIELD: \nLead\n ^\nERROR at Row:1:Column:17\nmalformed fieldList on retrieve"}

My sample code is

    sObject[] Srslt=null;
    LimitInfo[] retriveleads = apiClient.retrieve(logresponse.sheader, 
           null, null, null, null,"Lead", new string[] { 
           "00Q28000002kjUyEAI" }, out Srslt);

2 Answers 2


Looks to me like your not passing the correct parameters.. What are the fields you are querying for?

sObject[] result = connection.retrieve(string fieldList, string sObjectType, ID ids[]);


In Soap API has retrieve() shows

LimitInfo[]SoapClient.retrieve(SessionHeader SessionHeader,QueryOptions QueryOptions,MruHeader MruHeader,PackageVersion[] PackageVersionHeader,string fieldList,string sObjectType,string[] ids,out sObject[] result)

You must log in to answer this question.

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