NetSuite Projects – is there a way to notify assignee that a task is ready for completion based on predecessor task being completed?
Hi all,
is there a way to notify the assigned resource (either by email or a search that pops up on their dashboard) that a task can now be completed? Either if the task is marked as completed or all planned time has been enterred for the task.
Thanks in advance 🙂
I do something similar in script in user event script
When my workItemrecord is saved I compare previous and post values of status and then go find related tasks to move to an open or ready status. then you can drop an email if you want.
code snipets below. Not sure if you could also perform in a WorkFlow.
var prevWorkItem = scriptContext.oldRecord; var newWorkItem = scriptContext.newRecord;
if(didStatusChangeToComplete(newWorkItem,prevWorkItem)) { notify user or open new task }
function didStatusChangeToComplete(newWorkItem, prevWorkItem) { var status = newWorkItem.getValue({"fieldId" : "<mycustomField>"}); var prevStatus = ''; try { prevStatus = prevWorkItem.getValue({"fieldId": "<mycustomField>"}); }catch{} log.debug("status",status ); log.debug("prevStatus",prevStatus ); /* !! Caution !! * Empty fields from the Old record come back as `null` * Empty fields from the New record come back as an empty String * This means you cannot simply compare the old and new */ var changed = ((prevStatus || status) && (status !== prevStatus)); log.debug("changed",changed ); return (changed && status == 5); }