+ Start a Discussion
alo sen 6alo sen 6 

FileWrapper

In one of our company codes I encountered  public list<FileWrapper> listFileWrap{get;set;}  Is FileWrapper some salesforce object?
It holds records that need to be  sorted by Form_Type__c and  Form_Number__c. 
How can the sort be done? Any suggestion would be greatly appreciated.
Best Answer chosen by alo sen 6
Ashish DevAshish Dev
As name suggest FileWrapper is a wrapper class. You need to write a method to accept a list do sorting based on desired properties of wrapper class and return sorted list.
This could help you https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_list_sorting_sobject.htm

All Answers

alo sen 6alo sen 6
I just found that FileWrapper is a wrapper class. But i still have my questions on how to sort a wrapper class list.
Ashish DevAshish Dev
As name suggest FileWrapper is a wrapper class. You need to write a method to accept a list do sorting based on desired properties of wrapper class and return sorted list.
This could help you https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_list_sorting_sobject.htm
This was selected as the best answer
alo sen 6alo sen 6
Thank you. I was able to accomplish this.