• BTR
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies

Yes, I'm new to the Salesforce Developer community. But I'm no dummy when it comes to programming and I'm at the end of my rope here. I've been through this 20 different ways now, using various methods I found online and I just cannot get this thing to work.

 

What I'm trying to do is set up an Email Service that creates a case... aka Custom Email-To-Case.

 

I created a sandbox, so that I could write the apex code. My sandbox was empty so I created one account with a contact matching the email address I'm looking for.

 

There are very, very good reasons for doing this...  but the APEX Class absolutely will not look up my contact. Its agonizing.

 

I have an email, lets say it goes like this

 

APEX TEST

From: test@test.com

 

I am able to read in the test@test.com into a string variable and system.debug can write it out correctly.

 

So I'm looking to get the ID of the contact, and the AccountID of the contact.

 

By all accounts, I should be able to do this to access these variables:

 

Linking by email address in variable (this is what I really want)

List<Contact> contacts = [select id from Contact where email = :FinalEmail];

 Linking by hard-coded email address

List<Contact> contacts = [select id from Contact where email = 'test@test.com'];

 Linking to accountID directly

List<Contact> contacts = [select id, AccountId, from Contact where accountId = '001P000000aYGwf'];

 I've tried the older method...

Contact [] contactArray3 = [Select Id, AccountId from Contact where Email =: ContactEmailFinal limit 1];

I've tried setting it to a string variable ....  and about 15 other things

 

But no matter what I do, Index of 0 is out of bounds, and I cannot use the lookups... It simply does not find the contact, ever.

 

The main result I'm looking for is that I can look up a contact, get the contact ID, and connect that to a case

sCase.ContactId = contacts.Id;

 Please help! I'm in so much pain right now. I just want it to work... Thanks in advance.

 

 

 

 

 

  • June 26, 2013
  • Like
  • 0

OK. After 30 minutes, I figured out how to access these forums. Ridiculous. And infuriating.

 

Logging into DE and then clicking on the upper-right most icon and selecting 'Developer Community' Does not allow you to post or comment in the forums. Instead you must follow a very specific series of steps where you allow the forums to prompt you for the DE Login. Argh.

 

Don't get me wrong, I successfully entered my password about two dozen times during this process. The software just appears to not care and decides to ask you to re-login when you land on the DeveloperForce homepage.

 

GRRRRR 

 

I'm so pissed off that I have changed the topic from the one I need addressed to this, because I can't get over it. How do you expect people to figure it out with this crap situation going on? Don't you wonder why nobody is using your forums? Make it easy, please. Nobody should have to go through the pain I am right now.

 

Learning Apex has been a truly exciting and miserable experience, thus far.   

  • June 26, 2013
  • Like
  • 0

I am trying to set up the video solutions app, and everything is working great from within salesforce. 

 

However, when I log into the customer portal, the videos are not showing. 

 

How do I get the Video Solutions to work in the Customer portal? 

  • January 30, 2012
  • Like
  • 0

Yes, I'm new to the Salesforce Developer community. But I'm no dummy when it comes to programming and I'm at the end of my rope here. I've been through this 20 different ways now, using various methods I found online and I just cannot get this thing to work.

 

What I'm trying to do is set up an Email Service that creates a case... aka Custom Email-To-Case.

 

I created a sandbox, so that I could write the apex code. My sandbox was empty so I created one account with a contact matching the email address I'm looking for.

 

There are very, very good reasons for doing this...  but the APEX Class absolutely will not look up my contact. Its agonizing.

 

I have an email, lets say it goes like this

 

APEX TEST

From: test@test.com

 

I am able to read in the test@test.com into a string variable and system.debug can write it out correctly.

 

So I'm looking to get the ID of the contact, and the AccountID of the contact.

 

By all accounts, I should be able to do this to access these variables:

 

Linking by email address in variable (this is what I really want)

List<Contact> contacts = [select id from Contact where email = :FinalEmail];

 Linking by hard-coded email address

List<Contact> contacts = [select id from Contact where email = 'test@test.com'];

 Linking to accountID directly

List<Contact> contacts = [select id, AccountId, from Contact where accountId = '001P000000aYGwf'];

 I've tried the older method...

Contact [] contactArray3 = [Select Id, AccountId from Contact where Email =: ContactEmailFinal limit 1];

I've tried setting it to a string variable ....  and about 15 other things

 

But no matter what I do, Index of 0 is out of bounds, and I cannot use the lookups... It simply does not find the contact, ever.

 

The main result I'm looking for is that I can look up a contact, get the contact ID, and connect that to a case

sCase.ContactId = contacts.Id;

 Please help! I'm in so much pain right now. I just want it to work... Thanks in advance.

 

 

 

 

 

  • June 26, 2013
  • Like
  • 0

OK. After 30 minutes, I figured out how to access these forums. Ridiculous. And infuriating.

 

Logging into DE and then clicking on the upper-right most icon and selecting 'Developer Community' Does not allow you to post or comment in the forums. Instead you must follow a very specific series of steps where you allow the forums to prompt you for the DE Login. Argh.

 

Don't get me wrong, I successfully entered my password about two dozen times during this process. The software just appears to not care and decides to ask you to re-login when you land on the DeveloperForce homepage.

 

GRRRRR 

 

I'm so pissed off that I have changed the topic from the one I need addressed to this, because I can't get over it. How do you expect people to figure it out with this crap situation going on? Don't you wonder why nobody is using your forums? Make it easy, please. Nobody should have to go through the pain I am right now.

 

Learning Apex has been a truly exciting and miserable experience, thus far.   

  • June 26, 2013
  • Like
  • 0