You need to sign in to do that
Don't have an account?

Count() using javascript (for S-control)
Hi,
I'm attempting to create an S-Control which counts something (roll-up fields are not fiesable in my circumstance).
I don't know how to use the result in a useful way: the text displayed in the s-control is the followin
{done:'true', queryLocator:null, records:null, size:'53', }
I guess I don't know which methods to use to handle the object.
so here's the s-control
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head> <script type="text/javascript" src="/js/functions.js"></script> <script src="/soap/ajax/12.0/connection.js"></script></head><body><SCRIPT LANGUAGE="JavaScript"> var result = sforce.connection.query("select Count() Timesheet__c w "); document.write('result is:'+result);</SCRIPT></body></html>
Any help would be much appreciated.
yes , but thanks that wasn't the problem.
the solution is accessing result.size. this carries the count() result.
All Answers
yes , but thanks that wasn't the problem.
the solution is accessing result.size. this carries the count() result.