This topic contains 2 replies, has 0 voices, and was last updated by JulieFitz 9 years, 11 months ago.

  • Author
    Posts
  • #10154

    bsimmons105

    I’m trying to setup a workflow that sends an email to the customer once we approve an invoice of theirs.

    We have a free-form text field that stores the multiple email addresses, and we have been using that to copy from when we manually email the invoices to customers.

    I’d like to use a workflow to automate this, but I can’t pull up my custom free-form text field on the email workflow.

    Anyone know a way to do this?
    This is a cached copy. Click here to see the original post.

  • #10155

    marlon_villarama

    You need to use SuiteScript instead of a workflow to implement this functionality. A scheduled script would be best if you need to send the emails on a regular basis. You may follow these steps as a guide:

    1. Retrieve the value of the text field with nlapiGetFieldValue or getFieldValue.

    2. Split the retrieved text field value using your delimiter. If the string is comma-delimited, you might use something like

    var arrEmails = txtEmails.split(‘,’);

    3. Pass this array as the fifth parameter (cc) to nlapiSendEmail like so:

    nlapiSendEmail(-5, your_recipient, “Email Subject”, “Email message here…”, arrEmails);

    I hope this helps!

  • #10156

    JulieFitz

    You can do this with a workflow. We have a bundle that is already built if you are interested. The “trick” is to make the field type email and add it to the workflow, and then change it back to free-form text so that you can add multiple email addresses.

You must be logged in to reply to this topic.