+ Start a Discussion
cawacawa 

Apex trigger

Hi all

i got some issues i am listing out here.please respond as early as possible.

if we search a company it displays 100 records with same company name located in different places.can we sort the records by certain criteria like sort by stateor sort by city .

please reply very urgent

Best Answer chosen by Admin (Salesforce Developers) 
meerameera

Try using the keyword  "ORDER BY" fieldname.

All Answers

meerameera

Try using the keyword  "ORDER BY" fieldname.

This was selected as the best answer
incuGuSincuGuS

Are you using Apex code for your search? Or using the standard interface ?

 

If you are using the standard interface you can sort by the columns by clicking on its headers.

If you are using apex code and a custom approach you can use ORDER BY clause as the poster above suggested.

cawacawa

I AM USING STANDARD UI . I GOT THE SOLLUTION FOR THIS ISSUE: WE HAVE TO SELECT SETUP-CUSTOMIZE-SEARCH AND ENABLE ENHANCED LOOKUP OPTION.