KnotKnick
11/13/2019, 6:01 PMscriptContext.UserEventType.XEDIT
from the if
statement. Can anyone help?
function afterSubmit(scriptContext) {
log.debug('Started', scriptContext.type);
//if the event type is not EDIT, terminate the script
if(scriptContext.type !== scriptContext.UserEventType.EDIT || scriptContext.type !== scriptContext.UserEventType.XEDIT){
log.debug('Script terminated! Inappropriate type! See type!', scriptContext.type);
return;
}
//get internal id of the current record
var recId = scriptContext.newRecord.id;
log.debug('Ended', recId);
}
ehcanadian
11/13/2019, 6:06 PM&&
. EDIT
is not XEDIT
and vise versaKnotKnick
11/13/2019, 6:13 PMerictgrubaugh
11/13/2019, 6:20 PMEDIT
is NOT XEDIT
, therefore your if
was always triggeringerictgrubaugh
11/13/2019, 6:21 PMscottvonduhn
11/13/2019, 7:07 PM