Hi all, I am getting an error of “SSS_AUTHOR_MUST_BE_EMPLOYEE” in one of my user event script (deployed on Sales Order) - afterSubmit function. I think I know what the issue but don’t know how to solve it.
The issue is this – in my try-catch block I catch errors and send an email to myself at the end of code – and in the email the “from” email address I get it by using nlapiGetUser().
Now, the thing is this script also gets executed by “-System” also for some reason and as soon as the “-System” executes this script and if there is an error executing the script, this error is logged.
And because “-System” is not an employee record, NetSuite says it cannot find such user as one of the employee records. Ideally we don't want the "-System" to execute the script at all in the first place. But if it does then the author of the email should be at least the user who is editing the sales order. Has anyone faced a similar issue and how did you solve it?