I have a Map Reduce which gets a free form text of...
# suitescript
a
I have a Map Reduce which gets a free form text of the author employee id from a script parameter to send an email. It was working fine until now (i.e. this morning) I made other changes in the script and I changed it 2.1 but I didn't touch the part about the id for the email and I didn't touch the script parameter. I am getting the following error
SSS_AUTHOR_MUST_BE_EMPLOYEE - The author internal id or email must match an employee.
I double checked and the id is still an existing employee
e
Copy code
email.send({
    author: number*,
    body: string*,
    recipients: number | string | number[] | string[]*,
    subject: string*,
    attachments: | file.File[],
    bcc: number[] | string[],
    cc: number[] | string[],
    isInternalOnly: boolean,
    relatedRecords: Object,
    replyTo: string
})
email.send anticipates a number for the author id. Maybe try throwing it in a parseFloat()?
a
It is a number. I correct what I said before. It is an Integer Field not a free form text
So am I still not sure why its not working
e
Can you change it back to 2.0 and see if it works?
s
I'd also try actually making a string instead of a number.
a
I just tried both versions. Its fails in 2.1 and works in 2.0
As @Sandii suggested , apparently in 2.1 the author needs to be a string as when casting it to a string it worked. Documentation says it needs to be a number.... netsuite
a
@Azi are you on 2020.2?