function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
testing123testing123 

Not getting personal information using apex code

Hello !

 

I have created application same as given link:

 

http://wiki.developerforce.com/page/Force.com_for_ASP.NET_Developers

 

but i have made soime changes to apex 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 & Regards !

Niket SFNiket SF

Hello friend

      i hope you have application in the Asp.net with webservice. When you are runnin that application also need to be in running stage. Please check that are you able to connect to that webservice are not

 

Thanks 

Nik's

testing123testing123

Hello Nik,

 

Thanks for reply.

 

Actually i am running leadLookup1 page from salesforce (as it takes input email by textbox) and providing email address of my developer account and then click on search button (which will redirect to second page leadLookup2 that display city,street,address and postal code of entered email) 

 

but i am getting an error seems like:

 

System.QueryException: List has no rows for assignment to SObject
Class.PackageForce.GetLeadInfo.GetLeadAddressByEmail: line 4, column 1 Class.PackageForce.leadLookupController.getLead: line 13, column 1

 

so i guess i have error in my account only like i am missing permission or something.

 

help me asap, thanks and regards !