• Arto
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

Hi,

 

I need to create lookup to both Contacts and Users. The idea is to select name from either Users or Contacts, I tried many to many relationship but it does not allow assign User as master relationship. Any ideas how to do this?

  • September 03, 2009
  • Like
  • 0

What I am trying to do is determine if a Lead or Contact exist and they don't then add them as a new Lead.

 

Here is the Apex Class

 

global class getcontactinfo {

 Webservice static Contact getcontactemail(string Contact) {
 contact c = [Select Phone,Email from Contact where Email = :Contact];
 
    return c;
}
}

 

 

So what I am doing to calling this global class from within ASP.net VB.

 

If the users e-mail does not exist it is giving me this error : System.QueryException: List has no rows for assignment to SObject.

 

If the users e-mail does exist then I am getting this error : System.QueryException: List has more than 1 row for assignment to SObject

 

I need to get a value passed back to my ASP.net page so that I can either add them using the Web2Lead or not add them as a lead cause there e-mail exist already.

 

 

 

  • September 08, 2009
  • Like
  • 0