Version: eXtendFiles all versions
Audience: Administrator, Developer

Overview

Using NetSuite's native workflow functionality, you can easily send email notifications to a recipient when an eXtendFiles record is Approved or Rejected. See Using eXtendFiles' Approvals Features for more information on the file approvals feature.

In this sample, we'll be configuring an email template for the eXtendFiles record in combination with the "eXtendFiles - Original Transaction" record reference for use in Sample Workflow for eXtendFiles Approval Response.

Configuration

  1. Go to Documents → Templates → Email Templates → New to create a new email template.
  2. Enter a name and description for your email template, and set the Record Type to Custom Record.

  3. Enter the subject line to be used for your email on the Template subtab.

  4. In the template editor section on the Template subtab, click the Image Placeholdericon to enter code editor view.

  5. Paste the sample code below into the code editing area (swapping out text, images, etc. based on your requirements) and click the Image Placeholdericon again to preview your template. Click Save when you're finished editing.
<html xmlns="http://www.w3.org/1999/xhtml"><body style="margin-left: auto;margin-right: auto;max-width: 600px;padding-left: 2.275%;padding-right: 2.275%;font-family: 'Lato',sans-serif;font-weight: 300;padding: 30px;"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"><link href="https://fonts.googleapis.com/css?family=Lato:100,400,300,700,900" rel="stylesheet" type="text/css">
<div class="container" style="background-color: #fff;box-shadow: 10px 10px 5px #888888;border-color: #000000;border-style: solid;border-width: 1px;">
<header style="position: relative;display: block;background: ;">
<div class="titleBlock" style="padding: 10px 0;"><label class="companyLogo"><img alt="${companyinformation.companyname}" src="https://dhulnj2mbbb02.cloudfront.net/approval/logos/TSTDRV1739050-PRODUCTION/logo.png" style="max-width: 490px;padding-left:30px;" /></label></div>
</header>

<h2><span class="profileHeader" style="position: relative;display: block;padding: 10px 30px;font-weight: 400;border-bottom: 8px solid #000000;border-top: 8px solid #000000;">Proof response for ${customrecord.custrecord_extfile_so_pref}</span></h2>

<div style="padding: 0 10px;margin-bottom: 20px;"><#--FM:BEGIN--><#if (customrecord.custrecord_extfile_approved)?string == 'Yes'>
    <#if (customrecord.custrecord_extfile_user_comments)?has_content>
    <p style="margin:0;margin-top:5px;text-align:center;font-size:40px;padding:3%;font-weight:600;background:linear-gradient(to bottom, #ffbb00 5%, #f7fa19 100%);background-color:#ffbb00;border:1px solid #ffe904;display:inline-block;color:#ffffff;font-family:Arial;font-weight:bold;padding:1% 2.5%;text-decoration:none;">APPROVED WITH CHANGES</p><br/>
    <#else>
    <p style="margin:0;margin-top:5px;text-align:center;font-size:40px;padding:3%;font-weight:600;width:50%;background:linear-gradient(to bottom, #26703a 5%, #5cbf2a 100%);background-color:#26703a;border:1px solid #3b6e22;display:inline-block;color:#ffffff;font-family:Arial;font-weight:bold;padding:1% 2.5%;text-decoration:none;">APPROVED</p><br/>
    </#if>
                <#elseif (customrecord.custrecord_extfile_rejected)?string == 'Yes'>
                        <p style="margin:0;margin-top:5px;text-align:center;font-size:40px;padding:3%;font-weight:600;background:linear-gradient(to bottom, #a32a1f 5%, #fa2819 100%);background-color:#a32a1f;border:1px solid #942911;display:inline-block;color:#ffffff;font-family:Arial;font-weight:bold;padding:1% 2.5%;text-decoration:none;">REJECTED</p><br/>
                <#else></#if><#--FM:END-->

<p>Proof for <strong>${customrecord.custrecord_extfile_so_pref}</strong> has been responded to by <strong>${customrecord.custrecord_extfile_submituser}</strong> from <strong>${customrecord.custrecord_extfile_so_pref.name}</strong>.</p>

<p>File Name: ${customrecord.custrecord_extfile_filename}</p>
<#--FM:BEGIN--><#if (customrecord.custrecord_extfile_user_comments)?has_content>
                        <p style="font-weight:bold">Comments:</p>
      <p>${customrecord.custrecord_extfile_user_comments}</p>
    <#else></#if><#--FM:END--> <#--FM:BEGIN--><#if (customrecord.custrecord_extfile_rejected)?string == 'Yes'>
                        <p style="font-weight:bold">Proof rejection reason:</p>
                        <p>${customrecord.custrecord_extfile_rejectionreason}</p>
                <#else></#if><#--FM:END--> <span class="marker">Here is a link to the Proof: <span style="font-size:14px;"><span style="font-family:arial,helvetica,sans-serif;"><a href="${companyinformation.appurl}/app/common/custom/custrecordentry.nl?rectype=${customrecord.recType.internalid}&amp;id=${customrecord.internalid}&amp;whence=${companyinformation.companyid}" style="color: #0000EE; font-size:1em">Click here</a></span></span></span><br />
<span class="marker">Here is a link to the Order: <span style="font-size:14px;"><span style="font-family:arial,helvetica,sans-serif;"><a href="${companyinformation.appurl}/app/accounting/transactions/salesord.nl?id=${customrecord.custrecord_extfile_so_pref.id}&amp;whence=${companyinformation.companyid}" style="color: #0000EE; font-size:1em">Click here</a></span></span></span></div>
<br />
<br />
&nbsp;</div>
</body></html>

Image Placeholder


You can then use this email template manually or within a NetSuite workflow. See Sample Workflow for eXtendFiles Approval Response for more information on Workflow configuration.