0

html undefined error

Hi,

What in this script is causing the title error please?

let myPdf := printAndSaveRecord(this, "TASKS");
let myName := "New Task.pdf";
importFile(this, myPdf, myName);
'EMAIL SENT' := true;
let myEmail := userEmail(user());
sendEmail({
    from: userEmail(),
    to: userEmail(),
    cc: " ",
    bcc: " ",
    subject: "A new Task has been added for: " +
    concat('ASSIGNED ENGINEERS'.'ASSIGNED ENGINEER(S)') +
    " " +
    'TASK TITLE',
    text: "Att: " + concat('ASSIGNED ENGINEERS'.'ASSIGNED ENGINEER(S)') +
    "
" +
    "Please refer to the attached" +
    "
" +
    "Kind Regards" +
    "
" +
    userName() +
    " " +
    " ",
    attachments: file(this, myName)
})

3 replies

null
    • John_Halls
    • 3 mths ago
    • Reported - view

    Hi 

    This has caught a few people out

    You now need to include the html: element, even if you are not using html. Try adding

    html: null,
    

    to your code.

    Regards John

      • Alan_Cooke
      • 3 mths ago
      • Reported - view

       aha - how about that then :-)

      • Alan_Cooke
      • 3 mths ago
      • Reported - view

       spoke to soon - not happy:

      let myPdf := printAndSaveRecord(this, "TASKS");
      let myName := "New Task.pdf";
      importFile(this, myPdf, myName);
      'EMAIL SENT' := true;
      let myEmail := userEmail(user());
      sendEmail({
          from: userEmail(),
          to: userEmail(),
          cc: " ",
          bcc: " ",
          subject: "A new Task has been added for: " +
          concat('ASSIGNED ENGINEERS'.'ASSIGNED ENGINEER(S)') +
          " " +
          'TASK TITLE',
          html: null,
          text: "Att: " + concat('ASSIGNED ENGINEERS'.'ASSIGNED ENGINEER(S)') +
          "
      " +
          "Please refer to the attached" +
          "
      " +
          "Kind Regards" +
          "
      " +
          userName() +
          " " +
          " ",
          attachments: file(this, myName)
      })

Content aside

  • 3 mths agoLast active
  • 3Replies
  • 38Views
  • 2 Following