Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [sort]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
1answer
239 views

Notes & Attachments Wrapper class not sorting by LastModifiedDate correctly

I am using the below code with the Comparable interface to build a combined list of all the attachments and notes on a record, sorted in descending order of LastModifiedDate (in constructor of main ...
3
votes
1answer
181 views

Wrapper class sorting where sort is not lexicographical

I've seen a couple of questions regarding sorting a Wrapper class, but I don't believe any meet my requirements. (Please correct me if I'm wrong) So I've implemented sorting for my wrapper class, and ...
3
votes
1answer
1k views

Apexpages.currentPage().getUrl() is not returning the exact order of url params

I have implemented a code to get a URL parameters posted on custom site.The controller associated with custom site has Apexpages.currentPage().getUrl() method. For my implementation, It is very ...
5
votes
1answer
903 views

Sort with field of type String containing numbers and letters both

What is the best way to sort a List of String containing letters and numbers as values? I have tried couple of ways to sort, but with nothing I could make it work. Using a sort method of list Using ...
0
votes
2answers
81 views

Value getting stored in a weird way in List<String>

I have this below method which returns unique values of Name. And this is used in VF page in a multiselect picklist. Set<String> uniqueCustomObjectSet = new Set<String>(); ...
2
votes
1answer
394 views

Strange, slow behavior during ordering w/ REST API

I'm seeing some very bizarre SOQL performance when ordering by Id across several Sobjects. In this, they seem to take a very long time to select even just Ids when asked to sort by Id. Remove the ...
5
votes
1answer
1k views

Apex equivalent of Java Comparator

I already know about the equivalent of Comparable - the class to be sorted should implement Comparable and then you can sort a List of said class. But, how about Comparator? In java, the Collections....
2
votes
1answer
54 views

Wrapper List Sort by 2 text values

I have a wrapper class with 2 text values. I sorted them using Comparable. It works fine for one value. Here, I have AreaName and ADName. With the below I'm able to successfully sort by AreaName. ...
4
votes
1answer
4k views

How to sort keys in MAP while grouping

I am trying to insert list of wrapper class records in a MAP taking group name as KEY and related Wrapper class records as value pair . the wrapper classes were public class SCQLWrapperClass { ...
2
votes
1answer
2k views

Sorting apex:pageblocktable

I was wondering if someone has used the PageBlockTableEnhancerADV plugin and was able to implement sorting function for each column. I was trying to use the www.datatable.com sorting plugin but I can ...
1
vote
1answer
377 views

Custom Open Activities Inline Vf page with sort functionality

As we cannot sort open activities but on Go to List link page we can sort on any field ( Go To link appears if there are more than 5 records..this is standard functionality) .so I've built a custom ...
1
vote
1answer
2k views

How to sort a wrapper class list which has a reference to another wrapper in it

I want to sort a wrapper class list which has a reference to another wrapper in it.I tried implementing Comparable interface for both of class but it is showing error One or more of the items in ...
1
vote
1answer
2k views

Bootstrap table sorting not working for inputfield

I have used a Bootstrap datatable to show records in a tabular format as shown below And here is the simple code for the above page <style> input[type="text"] { display: ...
2
votes
0answers
79 views

Sort Products on QuoteLineItems

I am using Salesforce API 27 in .net tool to sync quote and opportunity from external system. However quote in external system and salesforce has not the same order. Salesforce is performing sorting ...
3
votes
1answer
2k views

Custom sObject sorting with 'implements comparable'

I'm trying to perform a sort on a list of custom sObjects using the 'implements comparable' wrapper method. I'm running into some error that it seems isn't affecting anyone else. My custom object ...
0
votes
0answers
183 views

Sorting pageBlockTable

I'm verry sorry, but got some really terrible spaghetti code here. Ids are passed to VF page with an extension which apparently has no function? Anyhow, I've implemented sort which does work if I ...
0
votes
1answer
31 views

Unwrap to sObject

I am using compareTo sort implementation. After sorting the wrapper I would like to get back a list of sObject. Is there a way to clone them off directly without hardcoding all field names? Code: ...
1
vote
1answer
909 views

Illegal assignment from void to LIST<>

I am trying to sort a list of sObjects using compareTo method example. Getting the error a mentioned in the tittle. Code below: public inputnulls(ApexPages.StandardSetController controller) { ...
9
votes
3answers
15k views

sorting columns in pageblocktable

I came across a reusable visualforce component to sort columns in pageblocktable.It works great on other browsers but not in IE and also sorting on currency fields is not working.Has anyone used it? ...