My Account | Internet Creations
Welcome, Guest.

Sort Case Flags by Color vs. Age

Summary

By default, flags will be sorted in list views based on the amount of time that has elapsed since the flag was set. For organizations utilizing multiple sets of flag aging processes, users may notice higher level flags (such as Red and Black) mixed in with lower level flags (such as Blue and Yellow). In certain instances, it may be more desirable to sort flags based directly on their color vs. the age.

Details

One way to accomplish this would be to create a custom formula field on the case object. To do so, please follow the steps outlined below.

1. Navigate to Setup > Customize > Cases > Fields.
2. Click the field label for Flag or Flag BH depending upon if your organization uses Business Hours, and copy the formula.
3. Navigate back to the previous page, and click the New button under Case Custom Fields & Relationships.
4. Select Formula as the Data Type and click Next
5. Specify a Name / Label for your new field, and select Text as the return type.
6. Paste in the formula copied earlier as the formula for your new field, and adjust all instances of flagsort=" with flagsort=1,2,3 or 4.
 
For example:

flagsort=" & FLAGS__Case_Flag_Age_Text__c & "&file=" & $Setup.FLAGS__FlagPref__c.FLAGS__Offset4Image__c, "L4", 16, 16)

would need to be adjusted to
flagsort=4" & FLAGS__Case_Flag_Age_Text__c & "&file=" & $Setup.FLAGS__FlagPref__c.FLAGS__Offset4Image__c, "L4", 16, 16)


7. Once the formula is solidified, click Check Syntax to ensure there are no errors and click Next.
8. Establish Field Level Security for the profiles in your organization and click Next
9. Select which Page Layouts you want to add the field to. If you're looking to simply use this field in Case List Views, consider deselecting all page layouts on this screen, and click Save.
10. Once the field has been successfully created, navigate back to the Cases tab.
11. Open up each List View, swap in your newly created field and remove the packaged field previously being used.
12. Test each List View by sorting on the new field to ensure the new sorting methodology is working as expected.

Please note:  This KB article is provided as-is and creating custom fields outside of the Case Flags package is not supported. For further assistance, please contact your Salesforce administrator, Salesforce implementation partner, or your Internet Creations Account Executive to inquire about professional services. 
 

Support

Open a Case