Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2022-05-18 10:33 AM
I created a custom object which clears two text fields when selection Yes on a value list field using a radio button. The issue I am having is when you select Yes or No it will clear the text fields. How do I fix my code to not clear the fields when you select No? Any help would be appreciated.
Thanks, Frank
Below is the code.
2022-05-18 11:05 AM - edited 2022-05-18 11:06 AM
@Fsantana, would either add debugger or console.log(selectedValue); before this line, if (selectedValue !== null && clearFieldOnValues.indexOf(selectedValue[0]) !== 0) { to see what value you're getting.
Advisory Consultant
2022-05-18 11:26 AM
values prior to change.
Selected the 'No' value console log shows ['421724:0']
2022-05-18 11:44 AM
Thanks. I think what's missing is that you need to see if the right radio button is checked. You can incorporate something like this, https://stackoverflow.com/a/8725267
Advisory Consultant