public inherited sharing class soqlExample {
public static String example(){
String SecondarySearchList = 'test';
List<List<SObject>> accountList = [
FIND :SecondarySearchList
IN NAME FIELDS
RETURNING Account(Id, Account.Name WHERE ID = '' LIMIT 100)
WITH USER_MODE
];
}
}
Reposting the issue from https://github.com/google/summit-ast/issues/53 here:
apex-parser doesn't support
WITH USER_MODE
andWITH SYSTEM_MODE
when used in SOSL.The Apex documentation is not clear, because:
Is the following code valid Apex code?
If yes, then someone needs to update the SOSL documentation and we probably need to enhance the parser: https://github.com/apex-dev-tools/apex-parser/blob/2f9160c4a33e5acf1a9014f0b67de0496df0ff47/antlr/ApexParser.g4#L826-L838
If no, then someone just needs to clarify the Apex documentation and remove the SOSL reference.