Hi, everyone. I'm a fairly new SuiteScript author,...
# suitescript
j
Hi, everyone. I'm a fairly new SuiteScript author, and I'm utterly puzzled by a behavior I'm encountering. I've reviewed the documentation, and I believe I'm doing everything right. I'm either missing something very simple and stupid, or there is something I just don't know about. I've got a map/reduce script in 2.1. I created 2 script parameters, free form text and an integer. In my script, during
getInputData
and during
summarize
, I call my function
getEmailDetails
to load up the email info I need from those parameters and pass it back. But I only get a value back from the integer. I don't get anything from the text. It's all quite simple, and I can't see what I'm doing wrong here.
Copy code
function getEmailDetails() {
    var emailRecipients = runtime.getCurrentScript().getParameter({
      name: "custscript_importrecipients", // Note the correct spelling here
    });
    var emailAuthor = runtime.getCurrentScript().getParameter({
      name: "custscript_importemailauthor",
    });

    log.debug({
      title: "email author id",
      details: emailAuthor,
    });
    log.debug({
      title: "email receivers",
      details: emailRecipients,
a
Spelling is wrong on the recipients parameter. Just copy and paste the id of the parameter into the code instead of hand key and it will solve your problem