Email Capture Plugin Setup In NetSuite

To verify if the attachment was saved successfully on File Cabinet:

  1. Navigate to Documents > Files > File Cabinet
  2. Click the specified folder on script from Step #2
  • Enable Server SuiteScript feature:
    • Navigate to Setup > Company > Enable Features
    • Click SuiteCloud
    • SuiteScript:
      •  Server SuiteScript: Enter Checkmark
    • Click Save
  • Create the Implementation Script file. Sample script below:

function process(email)

{

nlapiLogExecution(‘DEBUG’, ‘EMAIL PLUGIN TRIGGERED’);

var attachments = email.getAttachments();

if (attachments != null)

{

for (var a in attachments)

{

var attachment = attachments[a];

attachment.setFolder(326); // Folder Id

var fileId = nlapiSubmitFile(attachment);

} } }

Leave a comment

Your email address will not be published. Required fields are marked *