function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BARJRDBARJRD 

How to sort records selected from List View

When records are selected from a List View and passed to another page (e.g. via Mass Edit or Mass Update buttons) the records are not sorted in the new page (or perhaps are sorted by record Id?)

 

What is the best way to sort the records --- e.g., by Name --- before the new page is displayed?  I have created an extension, but cannot seem to get the records sorted before the page is displayed.

 

Any ideas?

 

Thanks,

Barb

ministe2003ministe2003

If you're running a SOQL query in your extension, use the ORDER BY command.

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_select.htm

BARJRDBARJRD

Thanks...I did have the ORDER BY in my SOQL query, but had another problem which I corrected.