+ Start a Discussion

Trying to find contact info. on contact Id

Here is my code. I have Custom__c object which has Admin person lookup to contacts. I need to find out the details of that contact. So I tried to use this query.
var c = sforce.connection.query("SELECT ID, Name  from Contact WHERE Contact.Id = '{!Custom__c.Primary_ContactId__c}'");
didn't return any records.
 So I tried this to check if Id's are same -
 var c = sforce.connection.query("SELECT ID, Name from Contact WHERE Contact.Name = '{!Custom__c.Primary_Contact__c}'");
var records = c.getArray("records");

first alert i m getting is  - 0033000000ob70wAAB
and second - 0033000000ob75A
Why am I getting different ID's for same contact?
So what should I do to get the detail about Contacts from my custom object?

Message Edited by NewToSF on 04-09-2008 02:05 PM
Any help?