You need to sign in to do that
Don't have an account?
John Gasior 9
Change fields on page based on picklist choice
Hi there!
I am looking to change the fields displayed on an opportunity based on a picklist value selected. For example, if someone selects 2020, the individual months for Jan - Dec will appear for a number to be entered.
If someone selects 2021, then the months for Jan - Dec of that year will appear for a numeric value to be entered. Is this possible? Does it require custom code?
Your requirement needs custom code. Using custom code as per Ifprachi said u should control the picklist field of you want further help on this plz explain your requirement with detailed example. I'm confused with numeric value to be entered.
So, it would be on the opportunity level, a controlling field named "Forecast year", with the options for 2020, 2021, 2022, 2023, 2034
If someone picked "2020", then below that there should be options for values to be entered for the custom objects
January 2020
February 2020
March 2020
April 2020
May 2020
June 2020
July 2020
August 2020
September 2020
October 2020
November 2020
December 2020
If they then picked "2021", the custom objects displayed should be
January 2021
febraruy 2021
March 2021
etc. to December 2021.
Does that help?
Why can't you use two fields? One field contains years and another is JAN-DEC Months. If you want to display both in the same field Create a formula field and show together.
If not fine with this solution, you can achieve this requirement with the help of a custom page using javascript. So page contains two fields one is for selecting a year and another for month and year together. Use Jquery also.
For reference use below code