You need to sign in to do that
Don't have an account?
Scooter429
SOQL Problem Querying Related Data Using Version 9.0 of Partner WSDL
I am getting the following error:
public DataTable SelectAllContactsFromSFDC(string SFUserId, string UserSessionId, string serverURL)
{
DataTable dtData = new DataTable();
try
{
Test.sforce.wsdl.SforceService Binding = sfLogin(UserSessionId, serverURL);
string sql = "select a.name, a.industry, (select c.lastname, c.leadsource from a.contacts c) from account a limit 100";
Test.sforce.wsdl.QueryResult qr = Binding.query(sql);
Test.sforce.wsdl.sObject[] records = qr.records;
// snip
catch (Exception ex)
{
// snip
throw;
}
return (dtData);
}
I am using the partner WSDL version 9.0.
I have tried this SOQL in the sforce explorer and it seems to work fine.
A more simple query of "select a.name, a.industry from account a limit 100" appears to work fine.
Does anyone have a suggestion on how to fix this?
Thank you.
MALFORMED_QUERY: SOQL statements can't query related data
From the following code:public DataTable SelectAllContactsFromSFDC(string SFUserId, string UserSessionId, string serverURL)
{
DataTable dtData = new DataTable();
try
{
Test.sforce.wsdl.SforceService Binding = sfLogin(UserSessionId, serverURL);
string sql = "select a.name, a.industry, (select c.lastname, c.leadsource from a.contacts c) from account a limit 100";
Test.sforce.wsdl.QueryResult qr = Binding.query(sql);
Test.sforce.wsdl.sObject[] records = qr.records;
// snip
catch (Exception ex)
{
// snip
throw;
}
return (dtData);
}
I am using the partner WSDL version 9.0.
I have tried this SOQL in the sforce explorer and it seems to work fine.
A more simple query of "select a.name, a.industry from account a limit 100" appears to work fine.
Does anyone have a suggestion on how to fix this?
Thank you.
Thanks for your help.
Scott