• sdavidow
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I have over 10 years CRM experience with SaaS - 4 with SFDC.  I have done Developement, Project Management, Implemenation and Administration (including end user training).

I focus on what will make the project a long term success.

If you need assistance with just about any aspect of SFDC, please let me know.  I'm interested in Contract, Contract to Hire or Full Time.
I'd like to use an APEX String variable to form the 'where ID =' clause of a SOQL Select statement

I am parsing a salesforce ID out of an email body text then feeding it into this query (which returns no rows):

... String caseNo = email.plainTextBody.substring(email.plainTextBody.indexOf('CaseId:'), email.plainTextBody.indexOf('<caseid>'));
//System.debug(caseNo);
Case caseToUpdate = [ select id, status, subject, description from Case where Id =  :caseNo limit 1];
...

Am I misunderstanding the 'ID = ' comparison behavior? When I debug, the runtime variable 'caseNo' is a valid ID.

Any suggestions?


Message Edited by icemft1976 on 05-06-2008 11:29 AM