You need to sign in to do that
Don't have an account?
JDev
AJAX mergefield syntax problem
I'm trying to use a merge field from a custom picklist in a where clause - my merge field value is "Mountain"
The following query runs successfully in Eclipse:
Select r.Region_Unit_ID__c, r.Name, r.Active__c From Region__c r where r.Name = 'Mountain' limit 1
However the following AJAX query returns error TypeError: records has no properties (if the where clause is passed a value - there is no problem if the value is null)
"Select r.Region_Unit_ID__c, r.Name, r.Active__c From Region__c r where r.Name = 'Mountain' limit 1", callback );
I've tried defining a variable and substituting the value but no luck - any ideas?
var thisWhere = "Mountain";
"Select r.Region_Unit_ID__c, r.Name, r.Active__c From Region__c r where r.Name = '" + thisWhere + "' limit 1", callback );
If I send null string I'm successful (but result is obviously unhelpful)
"Select r.Region_Unit_ID__c, r.Name, r.Active__c From Region__c r where r.Name = '' limit 1", callback );
JDev
Never mind - issue was related to result processing downstream variable syntax is fine