You need to sign in to do that
Don't have an account?
Rakin Mohammed
How to retrieve multi-picklist data in case creation, and how to export it to csv
Hi guys. I have a custom case object that prompts users upon creating a new case to select options from a picklist. Depending on which option is picked, the dependent sub-category picklist is then shown. Followed by a third sub-category. I need to be able to retrieve the different options and their succeeding choices in an excel sheet, with the dependent data all on the same row. I use the Python requests library to create a session with the Salesforce server and extract information from the page css. I also have the API names of the three picklists. Could anyone point me in the right direction to pull the picklist and push to csv file.
Try this blog (https://salesforceprofs.com/how-to-get-dependent-picklist-values-in-apex/) it explains how to get dependent picklist values in apex, in your case you can apply it twice for both dependent fields and merge the results after getting data for both fields.
Apex can only be used inside salesforce so you can create Apex Rest Resource(@restResource annotation) inside salesforce which can implement above process/method and call it using rest api from external phython code to get the picklist options data.
Thanks
All Answers
Try this blog (https://salesforceprofs.com/how-to-get-dependent-picklist-values-in-apex/) it explains how to get dependent picklist values in apex, in your case you can apply it twice for both dependent fields and merge the results after getting data for both fields.
Apex can only be used inside salesforce so you can create Apex Rest Resource(@restResource annotation) inside salesforce which can implement above process/method and call it using rest api from external phython code to get the picklist options data.
Thanks
Apex Rest Resource is way to expose code/logic to external systems from salesforce, which can be called using Rest Api. Checkout this link (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_rest_resource.htm) for more details.
Thanks