SOQL query not returning rows on visualforce page that do exist in object I am having issues retrieving records which exist from an object via a SOQL query on a visualforce page
How do I know they exist? I have used force explorer and workbench and the following returns a record
SELECT Code__c FROM External_membership_label__c WHERE Code__c = '3'
OK, so the visualforce page does not return the record above, with the code below (few lines from code)
public String gvlLCCODE {get;set;}
if(gvlLCCODE != null || gvlLCCODE != ''){
List<External_membership_label__c> exisitingGVLcodes = [SELECT Code__c FROM External_membership_label__c WHERE Code__c = :gvlLCCODE];
if (exisitingGVLcodes.Size() > 0){
//blahh blahh
}
}
Any suggestions? I have debug telling me 'gvlLCCODE' has a value that exists in the object. Also, if I change the SOQL to say, for example, return the current user from the users table, it returns a record and then enters the IF statement.
I think its a security issue I have missed. But I have also checked these.
Thank you