I'm trying to establish a method for creating a new VF page tab that contains lists of filtered records only where the records contain the name of the logged in user on a field (They are not the owner of the record).
Requirements:
- New VF page tab using Apex extendedList or PageBlock
- To filter and display multiple lists of records based on certain Role App and Opp record field values
- To use the name of the logged in user to filter these, but also to use some custom fields on their Contacts page containing other staff names, to include these in the filter condition.
Context:
In SalesForce Classic we have two custom objects named Opps and Role Applications, with a Master-Details relationship.
On both objects, we have a Role Manager field with the name of the Role Manager.
I’m trying to find the best solution for a Role Manager to login to their profile, navigate to a custom VF tab and view All Role Application and Opp records where they are named on the records. Sometimes they may also need to see a list of records belonging to another specifc staff member too. These staff names are provided on their contact record.
The user needs to see several lists for records they belong to, based on certain field criteria and conditions in the Role Applications and Opps.
We currently use Object List Views which are causing several issues here, both from a UX and accessibility point of view (users not clicking Go and seeing recent list items) and because I need to create some custom VisualForce Dashboards to display large numeric summaries for the user.
I’ve become a bit lost in what might be the best way to implement what I want.
Would creating multiple lookup fields with process builder between the Contacts record and the Role Applications / Opps, produce multiple filtered related lists on their contacts page, to display only that user’s records based on set criteria / filtering conditions? I think this may be an issue with the 10 lookup field limit. This was based on the solution posted here by Doug https://douglascayers.com/2015/11/18/salesforce-filter-related-lists-without-code/
The idea is I could then hide these sections from their Contacts page layout, then create a new VF page that displays only this related lists section, then use Roll up summaries on each related list to drive some VisualForce dashboards on the user's homepage. I'm not even sure a roll up summary field can be used to drive a VF dashboard?
I fear I might be heading completely down the wrong road here, one which may impact on performance and other issues, however I have not been able to find a clear way to simply produce a VF page to retrieve and display multiple filter lists belonging to that logged in user and other select staff members, then produce summary values of these lists for the VF dashboards. I've searched and searched but not found anything close to a similar case or solution.
Does anyone have any advice for the best way forward? Is there a better way to achieve what I want, perhaps using only Apex and VF pages instead of Lookups?
If List Views are the recommended solution, is it possible to create a VF page using a url list view hack that stacks multiple list views on the same page, with the ability to open and collapse sections holding these lists?
Any advice would be more than welcome here!
Many thanks.
3 个回答
Hi Ankush. Unfortunately I don't seem to ever get any replies on the developer forums. I'm not sure if it's because of my "newbie" status as I'm new to the community.
Is it ok to keep this question here just this once. I won't post any more programmatic questions on here. Thanks for providing info about these forums.