If the user presses 'cancel' in the email dialog box, or if nuBuilder detects an email error I would like to skip creation of the note record.
I have tried the code below:
Code: Select all
var scSuccess = emailIt('RPT-ServicePlan', scTo, scFrom, scSubject, scMessage, scFileName, false, 'PDF');
if (scSuccess) {
nuDebug('yyyyyyyyyyyyyyyyyyyyyyyyyyy');
}
else {
nuDebug('nnnnnnnnnnnnnnnnnnnnnnnnnnn');
}
If I understand correctly to only way to make JavaScript do this is for emailIt() to include a callback function? Is that right?
How is it possible to take action if the email was processed correctly? What do you suggest I do here?