Display fields dynamically when a checkbox is checked on Oracle sales mobile
We have a requirement that when 'Add partners' checkbox is checked (set to true), the other four fields shown on the code should be visible on the page.
When the 'Add Partners' checkbox is unchecked, the four fields should be hidden from the screen on runtime itself.
We have added a script in on field value change but it does not work as expected.
Here is the code:
const Row = getCurrentRow();
const Outcome = Row.AddPartnerSelectHereIfCustomerConsents_c;
if (Outcome === 'Y') {
Row.setColumnVisible('Tier1Partner_c', true);
Row.setColumnVisible('Tier1Track_c', true);
Row.setColumnVisible('Tier2Partner_c', true);
Row.setColumnVisible('Tier2Track_c', true);