function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
idan ashtamkeridan ashtamker 

SiteID in Contact . enterprise wsdl c#

hey, I'm trying to query the siteID from a contact  :
SforceService sfs = new SforceService();
sfs.query("SELECT id,accountID ,siteID FROM Contact  where MobilePhone like '999999999'");  


and I'm getting this error: No such column 'siteID' on entity 'Contact'


and when I'm trying to query from Sites: sfs.query("SELECT id FROM Sites" )
I'm getting : sObject type 'Sites' is not supported.


I'm using the enterprise wsdl as a webReference  in c#

thanks  :)

Best Answer chosen by idan ashtamker
Pankaj_GanwaniPankaj_Ganwani
Hi,

There is no field named as siteId on Contact object in salesforce. If you are referring custom field then add '__c' suffix with the field like siteId__c while querying the field value.

All Answers

Pankaj_GanwaniPankaj_Ganwani
Hi,

There is no field named as siteId on Contact object in salesforce. If you are referring custom field then add '__c' suffix with the field like siteId__c while querying the field value.
This was selected as the best answer
idan ashtamkeridan ashtamker
thanks  :)
I succeeded to run the query with site__c, now how do I read the value of site__c from the QueryResult?
Pankaj_GanwaniPankaj_Ganwani
Hi Idan,

Actually, I am not sure which methods in C# language you can use to extract the value from QueryResult. But there must be some pre-built classes or methods in C# through which you can get the value.
idan ashtamkeridan ashtamker
ok, thanks mate  :)