You need to sign in to do that
Don't have an account?
Nitish Singh 22
Exception handling for Dynamic SOSL
I have the following code :
String SOSL = 'FIND { "How can I pay my invoice?"} IN ALL FIELDS RETURNING WKArticleType__kav(Id,Title, CreatedDate, LastModifiedDate, Details__c, UrlName,Topic__C, Input_Method__c WHERE PublishStatus='Online' AND language ='en_US'offset 0)
try{
List<List<SObject>> genArticles = search.query(sosl) ;
}
catch(QueryException ex){
system.debug('Unable to fetch KB Article for the given facets'+ ex.getMessage());
}
I am having an exception of type System.UnexpectedException .The execution never goes to catch block.
Any suggestion would be appreciated
String SOSL = 'FIND { "How can I pay my invoice?"} IN ALL FIELDS RETURNING WKArticleType__kav(Id,Title, CreatedDate, LastModifiedDate, Details__c, UrlName,Topic__C, Input_Method__c WHERE PublishStatus='Online' AND language ='en_US'offset 0)
try{
List<List<SObject>> genArticles = search.query(sosl) ;
}
catch(QueryException ex){
system.debug('Unable to fetch KB Article for the given facets'+ ex.getMessage());
}
I am having an exception of type System.UnexpectedException .The execution never goes to catch block.
Any suggestion would be appreciated