salesforce - filtered related lists without code
TRANSCRIPT
![Page 1: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/1.jpg)
Filtered Related Lists Without Code
Nashville Salesforce Users Group
Doug Ayers
3/31/2016
![Page 2: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/2.jpg)
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
![Page 3: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/3.jpg)
This is a story about User Experience (UX)
http://www.adminhero.com/adoption/ http://cloud4good.com/announcements/six-steps-to-improve-user-experience/
![Page 4: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/4.jpg)
Problem: One Related List of Mixed Data
![Page 5: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/5.jpg)
Users Want Records Separated by Purpose
Custom Criteria
Record
Type
![Page 6: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/6.jpg)
We all want happy users, right?
![Page 7: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/7.jpg)
Same Object, Different Related Lists
![Page 8: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/8.jpg)
Same Object, Different Related Lists
Different Titles
![Page 9: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/9.jpg)
Same Object, Different Related Lists
Different Columns
![Page 10: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/10.jpg)
Same Object, Different Related Lists
Different Buttons
![Page 11: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/11.jpg)
Example: Active vs. Inactive Contacts
How can we separate these records into two lists?
![Page 12: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/12.jpg)
IdeaExchange – Vote Early, Vote Often!
http://bit.ly/IdeaFilteredRelatedListsByAdmin http://bit.ly/IdeaFilteredRelatedListsByUser
![Page 13: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/13.jpg)
Workaround 1: Custom Report Links
![Page 14: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/14.jpg)
Workaround 2: Visualforce & ApexCustom 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 add Visualfoce page to your page layout• Use Change Sets to deploy config to
productionhttps://www.linkedin.com/in/kevinpoorman
![Page 15: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/15.jpg)
![Page 16: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/16.jpg)
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
![Page 17: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/17.jpg)
![Page 18: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/18.jpg)
No Action Links(Edit, Delete)
![Page 19: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/19.jpg)
No Pagination
![Page 20: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/20.jpg)
No Buttons
![Page 21: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/21.jpg)
Open Source, Contributions Welcome
![Page 22: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/22.jpg)
Then, as my children say, “I have an idea!”
![Page 23: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/23.jpg)
Lookup fields create Related Lists!
Account
Contacts Tasks Opportunities
ID =
AccountId
http://bit.ly/TrailheadObjectRelationships
![Page 24: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/24.jpg)
Create a Lookup field for each Related List
![Page 25: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/25.jpg)
Create a Lookup field for each Related List
![Page 26: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/26.jpg)
Add New Related Lists to Page Layout
Lists are empty because we have not yet assigned account ids to the new lookup fields.
![Page 27: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/27.jpg)
Account
Contacts ActiveContacts
InactiveContacts
Assign Values to New Lookup Fields
ID =
AccountId
ID =
Active_Lookup__c
ID =
Inactive_Lookup__c
![Page 28: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/28.jpg)
Assign Values 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!
![Page 29: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/29.jpg)
Assign Value to New Lookup Fields
![Page 30: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/30.jpg)
Automate with Process Builderhttp://bit.ly/TrailheadProcessBuilder
![Page 31: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/31.jpg)
![Page 32: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/32.jpg)
![Page 33: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/33.jpg)
![Page 34: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/34.jpg)
![Page 35: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/35.jpg)
![Page 36: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/36.jpg)
![Page 37: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/37.jpg)
![Page 38: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/38.jpg)
Filtered Related Lists without Code!!!
![Page 39: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/39.jpg)
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
![Page 40: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/40.jpg)
Create “New Contact” Button
![Page 41: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/41.jpg)
Create “Merge Contacts” Button
![Page 42: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/42.jpg)
Add Custom Buttons to Related Lists
![Page 43: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/43.jpg)
Voila!
![Page 44: Salesforce - Filtered Related Lists Without Code](https://reader036.vdocument.in/reader036/viewer/2022062904/587c6b541a28abd04e8b4749/html5/thumbnails/44.jpg)
Go Make Happy Users
http://bit.ly/FilteredRelatedListsWithoutCode