Hello experts,
I have the following requirement:
We have an Interactive grid with a Switch column ('Yes'/'No').
Only one record in the grid should have a Switch column value that equals to ‘Yes’ ('Y').
If user changes the Switch to ‘Yes’ on any existing row, then any other row with Switch column set to ‘Yes’ should change to ‘No’.
If user adds a new row, and sets the Switch on this row to ‘Yes’, then any other row with Switch column set to ‘Yes’ should change to ‘No’ as well.
I need to loop through the Interactive grid to get values of the Switch column, to determine if any value, other than selected row, is equals to ‘Yes". Then, if any such value is found, change it to ’No'. The selected row's value should remain 'Yes".
Can you please push me to the right direction.
We are still on Apex 20.1
Thank you.