You need to sign in to do that
Don't have an account?
Krishna Prasad K P
"select count() ..." returns nothing!!
I recently started using the AJAX 'Explorer' for querying the SObjects.
But I do not get the result for "SELECT count() FROM <SObject>" statement !!.
I tried it for almost all my SObjects. But the output window shows nothing !!
Please provide me a solution,
Thanks in advance
Krishna
Not sure what your problem might be, but the syntax works fine for me with Apex Explorer 8.0.
SELECT COUNT() FROM ARTIST__C
Hope this helps.
I dont get results as tried with AJAX function tandard SObjects
debug shell (click the 'shell' icon in Ajax Tools), eg:
sforce.connection.query("SELECT count() FROM Account");
And this should display the count.
HTHs,
* Ajax function which passes query to the server is ---> sforce.connection.query("<query>").
* Result of the Ajax function "sforce.connection.query" is a structure in the form
done:'true', //query - success or failure?
queryLocator:null,
records:{ type:'<SObject>', Id:<id>, field1:value1,field2:value2,..... },
{ type:'<SObject>', Id:<id>, field1:value1,field2:value2,..... },
//each record is a sub structure
size:'<no of records>', // size is total number of records
}
* But 'select count()... ' result structure is a bit different from other query results. The result structure's 'records' item contains null but 'size' contains the actual result(means the count() value)...
* But the 'Explorer tool' source code ONLY parses 'records' and it shows in table format...
* Unfortunately 'select count() ...' result structure contains null records so we cannot see the results..!!
Message Edited by Krishnaprasad on 11-16-2007 03:02 AM