-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.txt
33 lines (27 loc) · 1.4 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
==========================================================
=============== Problem statement: ===================
==========================================================
SELECT AnnualRevenue, Type, Name
FROM Account
ORDER BY AnnualRevenue Desc NULLS LAST
---------------------------------------------------------------
RS_Sort_Level1 - Using Sort() method
AccountWrapper - Using Comparable interface
AccountSorter - Not Important - Which uses AccountWrapper
RS_Sort_Level1Test - Test Class
============================================================
=================== Extra credit: ====================
============================================================
SELECT AnnualRevenue, Type, Name
FROM Account
ORDER BY AnnualRevenue Desc NULLS LAST,
Type Asc NULLS LAST,
Name Asc NULLS LAST
------------------------------------------------------------
RS_Sort_Mul_Levels - Using Sort() method
AccountWrapperMul - Using Comparable interface
AccountSorterMul - Not Important - Which uses AccountWrapperMul
RS_Sort_Mul_LevelsTest - Test Class
This Test Class may fail as Type is PickList and SalesForce limitaion mentioed in
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_orderby.htm
As a workaround create a formula field likr Type__c with formula TEXT(Type)