+ Start a Discussion

Not getting personal information using apex code

Hello !


I have created application same as given link




but i have made soime chages to class as follows:


global class GetLeadInfo {

  WebService static Lead GetLeadAddressByEmail(string LeadEmail) {
      Lead l= new Lead();
    List<Lead> c= new List<Lead>();
    c = [SELECT Street, City, State, PostalCode from Lead WHERE Email = :LeadEmail];
    if (c.size() > 0)
        l = new Lead(Street = c[0].Street, City = c[0].City, State = c[0].State, PostalCode = c[0].PostalCode);
    return l; 


but i am not able to see response of city,state and etc. Though i am not getting any error but i am not getting any data too !


help me asap!


Thanks !


Hi testing123,


The response is going to come as a Lead sObject, not as those strings alone.