{"type":"error.SuiteScriptError","name":"SSS_AUTHO...
# suitescript
v
{"type":"error.SuiteScriptError","name":"SSS_AUTHOR_MUST_BE_EMPLOYEE","message":"The author internal id or email must match an employee.","stack":["Error\n at RecordInvoker.save (suitescript/resources/javascript/record/serverRecordService.js37113)\n at NetSuiteObject.thenableFunction() (suitescript/resources/javascript/record/proxy.js11524)\n
c
Can you share the code?
j
Is there a send email workflow associated with the save action of the record? If so, the workflow is being initiated by the script and not the current user. You'll need to update the workflow to have a default sender or use a field like sales rep.
v
@JessicaL no its just the creation and save record.
var custRefBankDetailRecord = record.create({ type : 'bank_details' }); custRefBankDetailRecord.setValue({ fieldId : 'name', value : name }); var custRefBankDetailRecordId = custRefBankDetailRecord.save({ enableSourcing : false, ignoreMandatoryFields : true });
c
Where is the try/catch block?
v
var custRefBankDetailRecord = record.create({ type : 'bank_details' }); custRefBankDetailRecord.setValue({ fieldId : 'name', value : name }); try{ var custRefBankDetailRecordId = custRefBankDetailRecord.save({ enableSourcing : false, ignoreMandatoryFields : true }); }catch(e){ log.debug('error',e) }
sorry this is the one
s
There is likely a script or workflow running on save on the record itself trying to send some email, and you are not filling out whatever it is reading from
👍 1
e
That error is related to using a From email address that is not associated with an employee record in NS. If you're not using N/email in your code you need to look for a workflow that is trying to send an email using a non-employee associated email address.