You need to sign in to do that
Don't have an account?
EtienneCoutant
Cannot retrieve AccountID or AccountName when Querying on Cases
I am using:
PHP toolkit-11_0b
PHP 5.1.6
Salesforce API version 11
I am trying to retrieve the Account name or id, when querying on Cases from the API, but I could not find a way to do that:
SELECT Id, Account.Name FROM Case --> Doe not work with PHP
SELECT Id, AccountId FROM Case --> No such column 'AccountId' on entity 'Case'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
SELECT Name, (SELECT Id FROM Cases WHERE Id = '".$MyCase->Id."') FROM Account --> Didn't understand relationship 'Cases' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
Someone can help me on that?
Thanks a lot,
Etienne
PHP toolkit-11_0b
PHP 5.1.6
Salesforce API version 11
I am trying to retrieve the Account name or id, when querying on Cases from the API, but I could not find a way to do that:
SELECT Id, Account.Name FROM Case --> Doe not work with PHP
SELECT Id, AccountId FROM Case --> No such column 'AccountId' on entity 'Case'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
SELECT Name, (SELECT Id FROM Cases WHERE Id = '".$MyCase->Id."') FROM Account --> Didn't understand relationship 'Cases' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
Someone can help me on that?
Thanks a lot,
Etienne
Message Edited by Tran Man on 02-26-2008 03:30 PM
I would assume that you could use $ThisCaseObject->sobjects[0]->Id if your query is "Select Id, Case.Account.Id from Case where Id = '$caseid'";