Update values with onCellEdit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2014 10:38 AM
Hi all,
I was working on a client script with allows the user to change the status of a project in the Project list, and in the same action I need to set the Active field to False and refresh the window to see reflected the change in the Active field, is it possible?
This is what I got but doesn't work,
function onCellEdit(sysIDs, table, oldValues, newValue, callback) {
var saveAndClose = true;
if (newValue == "Cancelled") {
g_form.setValue('active', false);
window.open("pm_project_list.do?", "_self");
}
callback(saveAndClose);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 06:09 AM
saveAndClose is a parameter for callback(), in this example it's not particularly necessary to declare it, considering callback will always get true in parameter.
if true is passed, the other scripts are executed or the change is committed if there are no more scripts. Otherwise the process stops and any further scripts are not executed nor changes are commited.