You need to sign in to do that
Don't have an account?
sfdc18
Content cannot be displayed: line 1:118 no viable alternative at character '\'
Hi,
I am getting below error on visualforce page for find query.
Please suggest the changes which I need to make in order to work with below code.
Error -- Content cannot be displayed: line 1:118 no viable alternative at character '\'
String parentIdWhereClause = parentCaseId != null ? 'AND Id <> \''+ parentCaseId +'\'': '';
string casesubjectSearch = caseSubject.replace(' ', ' OR ');
string sosl = 'FIND :casesubjectSearch IN ALL FIELDS RETURNING Case(id,CaseNumber, Subject where RecordTypeId =:recordtype '+String.escapeSingleQuotes(parentIdWhereClause)+' ORDER BY LastModifiedDate DESC) LIMIT 100';
List<List<case>> searchList = search.query(sosl);
I am getting below error on visualforce page for find query.
Please suggest the changes which I need to make in order to work with below code.
Error -- Content cannot be displayed: line 1:118 no viable alternative at character '\'
String parentIdWhereClause = parentCaseId != null ? 'AND Id <> \''+ parentCaseId +'\'': '';
string casesubjectSearch = caseSubject.replace(' ', ' OR ');
string sosl = 'FIND :casesubjectSearch IN ALL FIELDS RETURNING Case(id,CaseNumber, Subject where RecordTypeId =:recordtype '+String.escapeSingleQuotes(parentIdWhereClause)+' ORDER BY LastModifiedDate DESC) LIMIT 100';
List<List<case>> searchList = search.query(sosl);
Just remove String.escapeSingleQuotes from your code.