Hi experts,
I'm using Apex 19.2 and I have a Switch component with a D.A. on Change to show a popup for user's confirmation of changing the value of this switch:
apex.message.confirm('Are you sure?', function(okPressed) {
if(okPressed){
apex.page.submit('DELETE_PROJECT');
} else {
//Revert value
if ($v('P30_BILLABLE')=='Y')
$s('P30_BILLABLE', 'N');
else
$s('P30_BILLABLE', 'Y');
}
});
The idea is to revert the switch value to its original value, if user press cancel in the confirm dialog.
But it seems that using $s to set the value again, the D.A. is triggering again so I have a loop of messages.
Any ideas?
Thanks,
Jose.