System.QueryException: Only variable references are allowed in dynamic SOQL/SOSL
You need to check if you have put a colon ':' in between the query string.
Code-snippet for a dynamic SOQL -
String squery = 'SELECT Id, Name, recordTypeId FROM Account';
squery += ' where recordTypeId =\''+ devRecordTypeId+'\'';
Database.query(squery);
No comments:
Post a Comment