Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Salesforce - Filtered Related Lists Without Code

38,924 views

Published on

Have your users ever asked for a way to filter related lists or have multiple related lists that separate records based on criteria – much like how Open Activities and Activity History related lists separate Task records based on their status? In this session I will show you how to use native related lists to separate and filter records with NO apex code and NO visualforce, just a dash of Process Builder and some custom lookup fields.

This talk is based on my blog post: https://douglascayers.wordpress.com/2015/11/18/salesforce-filter-related-lists-without-code/

Published in: Technology

Salesforce - Filtered Related Lists Without Code

  1. 1. Filtered Related Lists Without Code Nashville Salesforce Users Group Doug Ayers 3/31/2016
  2. 2. Doug Ayers • Senior Developer @ Virsys12 • Nashville Salesforce Developers Group • 3+ years Salesforce Administration / Development • 8+ years Java Enterprise Web Development • @DouglasCAyers • github.com/DouglasCAyers • douglascayers.com
  3. 3. This is a story about User Experience (UX) http://www.adminhero.com/adoption/ http://cloud4good.com/announcements/six-steps-to-improve-user-experience/
  4. 4. Problem: One Related List of Mixed Data
  5. 5. Users Want Records Separated by Purpose Custom Criteria Record Type Status
  6. 6. We all want happy users, right?
  7. 7. Same Object, Different Related Lists
  8. 8. Same Object, Different Related Lists DifferentTitles
  9. 9. Same Object, Different Related Lists Different Columns
  10. 10. Same Object, Different Related Lists Different Buttons
  11. 11. Example: Active vs. Inactive Contacts How can we separate these records into two lists?
  12. 12. IdeaExchange –Vote Early,Vote Often! http://bit.ly/IdeaFilteredRelatedListsByAdmin http://bit.ly/IdeaFilteredRelatedListsByUser
  13. 13. Workaround 1: Custom Report Links
  14. 14. Workaround 2:Visualforce & Apex Custom Related Lists by Kevin Poorman (@CodeFriar) http://noeticpenguin.github.io/Custom-Related-Lists/ • Free, Unmanaged Package • Declarative Setup like Rollup Helper by Andy Fawcett • Generates Apex Class /Visualforce Page for you • You addVisualfoce page to your page layout • Use Change Sets to deploy config to production https://www.linkedin.com/in/kevinpoorman
  15. 15. Check out this link for more info about embedding visualforce pages on page layouts https://developer.salesforce.com/docs/atlas.en-us.workbook_vf.meta/workbook_vf/overrides_2.htm
  16. 16. No Action Links (Edit, Delete)
  17. 17. No Pagination
  18. 18. No Buttons
  19. 19. Open Source, ContributionsWelcome
  20. 20. Then, as my children say, “I have an idea!”
  21. 21. Lookup fields create Related Lists! Account Contacts Tasks Opportunities ID = AccountId http://bit.ly/TrailheadObjectRelationships
  22. 22. Create a Lookup field for each Related List
  23. 23. Create a Lookup field for each Related List
  24. 24. Add New Related Lists to Page Layout Lists are empty because we have not yet assigned account ids to the new lookup fields.
  25. 25. Account Contacts Active Contacts Inactive Contacts AssignValues to New Lookup Fields ID = AccountId ID = Active_Lookup__c ID = Inactive_Lookup__c
  26. 26. AssignValues to New Lookup Fields Records display in the “Contacts” related list because their AccountId matches the account being viewed. Likewise, records will display in the new related lists if the corresponding lookup field value matches the account being viewed. We need to assign these field values!
  27. 27. AssignValue to New Lookup Fields
  28. 28. Automate with Process Builder http://bit.ly/TrailheadProcessBuilder
  29. 29. Filtered Related Lists without Code!!!
  30. 30. One Last Step… Create Custom Buttons Buttons on related lists populate the lookup field corresponding to that related list. In this case, the “New Contact” button on “Active Contacts” assigned the AccountId to the “Active Lookup” field, not the “Account Name”. ID = AccountId ID = Active_Lookup__c
  31. 31. Create “New Contact” Button
  32. 32. Create “Merge Contacts” Button
  33. 33. Add Custom Buttons to Related Lists
  34. 34. Voila!
  35. 35. Go Make Happy Users  http://bit.ly/FilteredRelatedListsWithoutCode

×