You need to sign in to do that
Don't have an account?
sravu
Search Not Returning all fields from Case object
Hi,
My SOSL query on Case object not searching in all the fields except CaseNumber and Subject; I have few custom fields and formula fileds that I am using in case object.
Below is my code to return the search results. Could anyone please help me with this issue.
public List<Case> getCasesMPU(){ if(CasesMPU==null){ String escapedSearchTermParam = '*'+ApexPages.currentPage().getParameters().get('searchTerm')+'*'; List<List<SObject>> searchList = [FIND :escapedSearchTermParam IN ALL FIELDS RETURNING Case (Id) LIMIT 200]; List<Case> cases = ((List<case>) searchList[0]); casesMPU = [select Id,Subject,CaseNumber, Resolution__c,AccountId, Status, Priority,DesktopProduct__c, Created__c,Modified__c,Submitted_By__c,CreatedDate,SystemProfileVersion__c,System_profile__r.Name,System_profile__r.Version__c,System_Profile__r.Id from Case where Id in :cases and (status='open' or status='closed' or status='escalated') order by Id desc]; } return CasesMPU; }
Even it is not searching in status and priority fileds also.
Thanks in advance.