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
Anil DuttAnil Dutt 

Sort object fields in same order as presented in Salesforce

Hi,

I have a custom object which has a field Name datatype AutoNumber. I used Component to show redcors in VF,  when i fetch records and sort it on Name asc records has different order as in List presented in Opportunity page. List has Sort By: --Default-- and is not in sorted order, it seems random

List in Opportunity shows Like this

Airlien  Name                                                  E-Ticket#

Air India                                                           1118

Kingfisher                                                        1115

Indigo                                                               1116

Spice Jet                                                         1117

Jet Airways                                                      1119

So not sure on which field data is sorted

so the problem is what is the default sort order got any list?

I hope i explained my point

Thaks in advance

Tejpal KumawatTejpal Kumawat

Hi Anil,

 

Where you are querying add "ORDER BY LastModifiedDate "..

 

 

--------------------
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

Thanks

Anil DuttAnil Dutt

Is LastModifiedDate not same for all records modified today as it is only date?

 

And Is LastModifiedDate used in Lists for --Default-- order?