function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JBerryJBerry 

sforce.connection.query Not returning Correct Values

Hi, I'm currently designing a custom tab/area to run reports through,
but am having a bit of trouble validating some of the information and I'm at a standstill.

Basically, when I'm running my query I can validate if a checkbox is not checked(false)
and that returns all of my false values correctly.  But, when I try to validate
if the checkbox is checked(true), it returns nothing.
My code is:


var result = sforce.connection.query
("Select Event_Date__c,Name,Launch_Support_Notes__c,Review__c,Follow_up_support_notes__c
From Opportunity Where (Event_Date__c>=2007-05-04 AND Event_Date__c<=2007-05-04)
and Review__c=true ");

The bold is the field name, and the status(true). 

Like I mentioned:When that is changed to false, it works correctly. 
When it is changed to true, it returns no values.
I have also ran my code without the true/false validation, and so it lists all my values
and shows true and false, so I know there are records to be pulled. Any help would be greatly
appreciated! Thanks!

Message Edited by JBerry on 05-25-2007 06:10 PM

Message Edited by JBerry on 05-25-2007 06:11 PM

PBS_IC786PBS_IC786
Maybe if you tried not equal to false to substitute for the true response...

!=false

HTHs
JBerryJBerry
Nope, Not equals doesnt work either.  But, I found a workaround.
I'm just using reverse logic for the field, so now I will validate for false instead of true
since false works correctly.