Trying to transfer an apex query to Javascript. Wondering if binding works in the same manner?
Also is using result.length valid for the if statement?
var accLike = '%' + 'Construction' + '%';
var accId = '0E40040503F023FE';
result = sforce.connection.query('SELECT Id, Name FROM Account WHERE (Id =: accId) OR (Name LIKE :accLike)');
if(result.length > 0){
alert('result.length');
}