I want to sort related-list records on CreatedDate in ascending. But I don't want to show CreatedDate field in related-list. Any thoughts? Can I use default sorting?
Attribution to: doga
Possible Suggestion/Solution #1
I don't think it's possible. Even when tweaking the layout in Eclipse IDE you'll get an error back.
Save error: The sort field: CreatedDate is not a displayed field in the related list
Can you sort by it indirectly? Maybe you have an autonumber field there?
Attribution to: eyescream
Possible Suggestion/Solution #2
You can create a custom VF page and sort a list of sObjects by the field you want it to be sorted on. Simply not show the column CreatedDate.
Sdry's comment proved me wrong (it IS possible), take a look at this aswell: http://boards.developerforce.com/t5/Apex-Code-Development/A-gift-for-you-Sorting-a-List-lt-sObject-gt/td-p/107833
Attribution to: krobbens
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/4488