return false; not working in on change Client script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2022 10:54 AM
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if (g_scratchpad.x == '5 year') {
var answer = confirm(" are you sure to change long term holding ");
if (answer == true) {
g_form.addInfoMessage("long term holding changes to " + newValue);
} else {
return false;
}
}
}
Labels:
- Labels:
-
Incident Management
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2022 11:27 AM
Hi,
return false; will work on onSubmit client script type not on onChange or onLoad.
As onChange is not like submitting the record/form
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2022 11:33 AM
Hope this makes sense Chandra!!
Regards,
Shloke
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke