
Unable To Set a Record Type in Salesforce Object in Salesforce Community
January 21, 2019
How To Case Comments in Case Object Without The Public Checkbox in Salesforce?
January 21, 2019Problem Description in reporting in salesforce
Salesforce doesn’t allow users to create a report based on an individual multi-picklist field or group the reports based on an individual multi-picklist.
Challenges to User/Developer :
A workaround for this is to create a custom object which holds the multi-picklist values of the object you are trying to build a report on.
Solution :
Challenges on Multi Select While Reporting in Salesforce
Approach:
Create a custom object which has a master-detail relationship with your reportable object. Create two fields. One which holds the multi-picklists and the other which holds individual values.
Technical Solution :
If it is necessary to build reports based on multi-picklists, then follow the below steps as a workaround for the limitation.
Let us consider Account as the object which has multi picklist fields.
- Create a custom object which has a master-detail relationship with the Account.
- Create 2 fields in the custom object.
- Type (Picklist) – It holds all the multi-picklist fields of Account.
- Value (Text) – It holds a single value of the picklist field.
- Created an apex class that fills in the “value” field. (This apex class creates a new record of the custom object for each multi-picklist field value you have selected in your original object).
- Now create a report for the custom field you have created.
- If a report has to be created on one particular multi-picklist field you can filter the report by using the type field in the custom field you created
Advantage :
Scalable, Doesn’t impact the performance, easy to implement, easy to migrate
Issues :
None
Conclusion :
Using this approach, reports can be created on multi-picklist values.