function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nitin Kumar 162Nitin Kumar 162 

Can we add dropdowns at contact form with dynamic value?

I want to add two dropdowns at contact create form and I want to fetch these dropdowns value from an object It can be possible.
Please suggest the best idea.
Manoj Maraka 18Manoj Maraka 18

Hi Nitin,

Are you trying to create Contact from a standard page or you have a custom VF/Lightning component to create?

 

Durai SaravananDurai Saravanan
Hi Nitin Kumar,

It is absolutely possible.

First let me explain your question clearly. You want a dropdown in your form, which will be dynamically populated based on values from an object.

You can go through this concept, SelectList,

and the developer guide link for selectlist is,
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_selectList.htm

Try implementing this, and in case you're stuck, you can reply with your queries.

Hope this helps you get some picture.

Please mark this as 'Best Answer' if my reply was helpful. It will make it available for other as the proper solution.

Best regards,
Durairaj Saravanan

 
Nitin Kumar 162Nitin Kumar 162
Hi,
I want to create a dropdown list at Contact from (standard page) using the picklist. Is it possible to create a dynamic picklist and fetch the picklist value from the other object?
Manoj Maraka 18Manoj Maraka 18

Hi Nitin,

Ok, if I understand it correctly, you would like to use same picklist values in 2 different objects. You will be able to do it with global picklists.
Follow the steps below :
1. Go to Picklist field in your "other" object.
2. Edit & click on Promote to Global value set button. Give a name and save it.
3. Use the same Global Value Set in your Contact object Picklist field.

From then onwards, in case you need to add an additional picklist option, you will add it in Global value set and that will be available in both the objects.

Please mark this as 'Best Answer' if my reply was helpful. It will make it available for other as the proper solution.

Regards,
Manoj.