Cascading Drop Downs

I am trying to implement code in an OnChange script that when one drop down is changed it changes the available values in another drop down. For instance one field is Finish Types: 2603, 2604 are options, when 2603 is select the Finish Options will have A, B, C, as selectable options, and 2604 would give you D, E, and F. Both fields are drop downs, but change the one changes the available values in the other. I couldn't find any example detailed enough for me to get started on this. Would appreciate any code examples that could be supplied. 

Parents
  • 0

    This has been a problem for as long as I've been dealing with Sage CRM (15 years). There is still no decent solution to this. Of all the potential solutions I've found, there is always a way to mess it up. You can get creative with using RemoveLookup but that only works when loading the screen and changing to edit mode. With the clientside scripting you might be able to do it more easily now. You will first need a custom content script on the page which contains a function to hold the states. The in the onchange you call that function based on the selected value. The function removes everything when the selected value is blank so you can't save anything in finish options without a value in finish type. When you choose a value in type, it reloads the correct values in options. You will need to make sure the correct values are set when doing this, so that when you save, the right form values are there in the dropdowns. It's a right pain to implement. It's a very commonly asked for feature. No decent solution exists on the forum that I've found. It's a common thing in many other CRM systems.

Reply
  • 0

    This has been a problem for as long as I've been dealing with Sage CRM (15 years). There is still no decent solution to this. Of all the potential solutions I've found, there is always a way to mess it up. You can get creative with using RemoveLookup but that only works when loading the screen and changing to edit mode. With the clientside scripting you might be able to do it more easily now. You will first need a custom content script on the page which contains a function to hold the states. The in the onchange you call that function based on the selected value. The function removes everything when the selected value is blank so you can't save anything in finish options without a value in finish type. When you choose a value in type, it reloads the correct values in options. You will need to make sure the correct values are set when doing this, so that when you save, the right form values are there in the dropdowns. It's a right pain to implement. It's a very commonly asked for feature. No decent solution exists on the forum that I've found. It's a common thing in many other CRM systems.

Children