You need to sign in to do that
Don't have an account?
How to Query using the Salesforce ID object name
Hello all,
I need to find all case objects for a particular contact, but the only constraint that I can see which will give me this is the ContactID. But when I try to run a query using this field, I get a binding.query exception.
My query statement looks like this:
Contact sup_Cont = (Contact) mgr_recs[0];
tmpParentID = sup_Cont.getId();
strAcctIDsql = "SELECT ID FROM _case WHERE contactId = '" + tmpParentID.getValue() + "' ";
As an alternative, I guess I couldquery ALL Case-objects, and then do a string-compare on the ContactID to see if it belongs to a contact, but that just seems stupid.
Anyone have any ideas about what I'm doing wrong?
Thanx!
..i'd also strongly recommend you use the SOQL explorer at sforce.sf.net for building queries - makes debugging these types of issues much easier!