Can we sort Salesforce Activity History? Until Summer '14 release, user cannot sort related list manually (including Activity History), and admin also not able to change the default sort. Activity History is always sort by Due Date (or ActivityDate in API name) in descending order and it will not consider the created/modified date to have it listed as the latest record.
Here is a clear example of Activity History with the same Due Date:
Remember Due Date is just a date, no time stamp, so if you have multiple activity history created at the same date, it will not order by created or last modified date time
But, we have a workaround, here we go:
1. Create Custom Button in Task
Setup - Customize - Activities - Task Buttons, Links, and Actions
Click "New Button or Link", then select Behavior, Content Source and URL as screenshot below:
Here is a clear example of Activity History with the same Due Date:
Then, we edit item 2 and 3, we change the Due Date for item 2 to 8/23 and item 3 to 8/25, it will be re-sort with Due Date desc.
Remember Due Date is just a date, no time stamp, so if you have multiple activity history created at the same date, it will not order by created or last modified date time
But, we have a workaround, here we go:
1. Create Custom Button in Task
Setup - Customize - Activities - Task Buttons, Links, and Actions
Click "New Button or Link", then select Behavior, Content Source and URL as screenshot below:
/007?id={!Account.Id}&rlid=RelatedHistoryList <-- this is for Account
2. Add Custom Button into Account or Contact or other object page layout
Edit the Layout, scroll to Related Lists and look for Activity History.
Click 'Related List Properties' icon, then click + in Buttons sections, add the button to right panel
3. Save the Page Layout and Done.
User will see new button added to 'Activity History' related list. When user click the button, it will open new page where user will be able to sort by any fields.
No comments:
Post a Comment