You need to sign in to do that
Don't have an account?
Mike @ Partners
Query for Record Type Id says No such column
I have a custom object with record types. When i try and query for the record type id it give me the error:
"Uncaught SoapFault exception: [ns1:INVALID_FIELD] INVALID_FIELD"..."No such column 'RecordTypeId' on entity 'Certification__c'"
I don't know why it started doing this all of the sudden. The script has worked great for months. Also the RecordTypeId shows up in the WSDL.
Here is the code:
////////
$query = "SELECT Id, RecordTypeId from Certification__c where Contact__c = '".$ContactID."'";
$response = $sforce->query(($query), $queryOptions);
$Info = $response->records;
if ($Info){
try {
foreach ($Info as $r) {
$r = new SObject($r);
$RecordTypeId = $r->fields->RecordTypeId;
echo $RecordTypeId."
";
}
}
}
///////
I have this happening with two different scripts looking at two different custom objects. I was thinking that there is something on my server causing this, but the other thing is i can query another information no problem.
Any help or ideas would be greatly appreciated.
Thank you,
mike
"Uncaught SoapFault exception: [ns1:INVALID_FIELD] INVALID_FIELD"..."No such column 'RecordTypeId' on entity 'Certification__c'"
I don't know why it started doing this all of the sudden. The script has worked great for months. Also the RecordTypeId shows up in the WSDL.
Here is the code:
////////
$query = "SELECT Id, RecordTypeId from Certification__c where Contact__c = '".$ContactID."'";
$response = $sforce->query(($query), $queryOptions);
$Info = $response->records;
if ($Info){
try {
foreach ($Info as $r) {
$r = new SObject($r);
$RecordTypeId = $r->fields->RecordTypeId;
echo $RecordTypeId."
";
}
}
}
///////
I have this happening with two different scripts looking at two different custom objects. I was thinking that there is something on my server causing this, but the other thing is i can query another information no problem.
Any help or ideas would be greatly appreciated.
Thank you,
mike
if you have, comment this line out:
//$r = new SObject($r);
The New QueryResult already does the SObject instantiation.
Hope this helps!
~Mike