Version: eXtendFiles 1.6.4 and above
Audience: Administrator

Use Cases

  • Enable file uploads using the drag and drop feature.

Summary

The eXtendFiles Inline Upload feature allows you to upload files directly from your NetSuite records using a drag and drop area on the record's form. Additionally, the inline upload feature also facilitates requiring attributes that you want to set on the uploaded file.

Without attributes:
Image Placeholder

With attributes:
Image Placeholder

Note: The inline upload feature is available in View mode and Edit mode for existing records. Create mode is not supported at this time.

The following sections walk through the configuration of the eXtendFiles Inline Upload feature.

Setup Configuration

The eXtendFiles Setup needs to be configured to enable this feature.
  1. Go to eXtendTech eXtendFiles Setup.

  2. Go to the Inline Links & Uploads subtab and select the FileUpload on Record Settings sublist.Image Placeholder
  3. Configure the record types where the inline upload feature should be enabled.
 Fields
Description 
Record Type
The record type where the inline upload feature will be enabled.
eXtendFiles Reference FieldID
The custom field on the eXtendFiles record which refers to the record on which you are configuring inline upload feature.

This field is a custom field on the eXtendFile record and it stores the record reference to which the eXtendFile is being attached.
Inline Field on Record
An Inline HTML body field present on the record type being configured which will be used for displaying the inline upload drag and drop interface.

You'll need to make the Inline HTML field visible on the custom forms for the target record type on which you want to use the Inline Upload feature.
Folder Information Record Field ID
Specify the field value, based on the eXtendFiles - Folder Information custom record type, which will be used for the selection of folders when uploading files using the public upload feature.

This field is applicable only for Amazon S3, Oracle Object Cloud, and Microsoft Azure.

eXtendFiles includes the following field for native NetSuite transaction types: custbody_extend_files_folder_info

Note: the field must be of the List/Record field type and the sourcing record should be eXtendFiles - Folder information.
Enable In View Mode
To show the inline upload feature when the record is in View Mode, enable this field. By default, inline uploads are only enabled in Edit Mode.
Upload iFrame Height (Pixel)
Adjust the height (in pixels) for the drag and drop file upload area.
Do Not Use JS Script For Iframe
This checkbox is required for some specific record types which do not allow client scripts to load iframe content. Record types which need this preference enabled for showing inline upload section are:

Project/Job
Job Task
Project Task
Timesheet
Upload Query Param Data Set (JSON Stringified)
Using JSON Stringified format, specify any fieldIDs and field values which you would like applied to eXtendFiles records uploaded via the inline upload feature.

Example code for setting the File Type (Custom) field:
{"custrecord_extfile_type_custlist":5}
Custom eXtendFiles Attribute
Using JSON Stringified format, specify any eXtendFiles Record fieldIDs along with the source list and the label you want to show on the inline file upload section.

This feature allows the selection of eXtendFiles attributes on your record and which will be applied to the uploaded file.

Format for specifying the fields:
[{ "fieldId": "eXtendFiles Field ID", // required only in case of select and multiselect "source": "Source List/Record's ID", // label which will be shown on the file upload section "label": "Label name", // determines if this field is required for upload or not. If true then file upload section will be disabled unless any value is specified under this field. "required": true, // determines to use native NetSuite styling or custom styling to show fields "native": false, // data type of the field used - presently supports text, select & multi-select "type": "select" }]

Example code to configure the File Type (Custom) drop down field as required to prompt the user: 
[{"fieldId":"custrecord_extfile_type_custlist",  "source": "customlist_extend_s3fr_record_type",  "label": "File Type","native":false,"required": true}]


Example code to configure the File Type (Custom) drop down field as required to prompt the user AND filter the list of available file type options by internal ID: 
[{"fieldId":"custrecord_extfile_type_custlist",  "source": "customlist_extend_s3fr_record_type",  "label": "File Type","required": true, "native": false,"filterExpression": ["internalid","anyof",[1,2,3,4]] }]


Notes: 
  1. When copying and pasting field IDs in NetSuite, be careful to avoid any leading or trailing whitespace that may be unintentionally inserted when specifying field values.
  2. For a list of valid native NetSuite record types, please refer to the NetSuite record browser: https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2023_2/script/record/account.html

Additional Custom eXtendFiles Attribute details:
  • If you want to mark a field mandatory for selection before uploading files, add the attribute "required=true" while specifying the associated field.
  • If a field is defined in both UPLOAD QUERY PARAM DATASET(JSON STRINGIFIED) and in the CUSTOM EXTENDFILES ATTRIBUTE, then the hardcoded value defined in UPLOAD QUERY PARAM DATASET(JSON STRINGIFIED) is ignored.
  • Only drop-down fields (single and multi-select drop-down fields) and text fields are supported at this time.
  • You must set NetSuite's "MAXIMUM ENTRIES IN DROPDOWNS" setting (see SuiteAnswers article id 90723 for modifying this setting) to a value less than the number of options present in your custom attribute field for it to be shown in the Inline Upload selection. If you don't want to lower the value configured in this NetSuite setting, you can add an additional attribute "native=false" to enable the select2 drop-down list in place of the native drop-down list. Please check the example below for the format of this attribute.
  • You can also specify filter expressions for filtering the dropdown list values using the same filter expressions as are supported by NetSuite. Please check the example below the formatting of filter expressions.
  • If you want to clear the value in the selected field, click the Clear Field present below the field in the Inline Upload section. 
  • If you want to include line level information on the uploaded files then you will need to include the following attribute: {"fieldId":"line_item","label":USER_DEFINED_LABEL,"required":BOOLEAN}The map between uploaded files and line items can be seen on the eXtendFiles inline view field and under "UPLOADED FILES DETAILSin a JSON structure. (Supported on and after eXtendFiles version 1.5.4.8
Example: 
[{ "fieldId" : "custrecord_extfile_type_custlist", 
"source" : "customlist_extend_s3fr_recordtype", 
"label" : "File Type", 
"required" : true, 
"native" : false, 
"type" : "select",         
 "filterExpression" : ["internalid","anyof",[139]] 
}]

Script Deployments

For the inline upload feature to operate, script deployments need to be created so that the necessary scripts are available and running.
  1. eXtendFiles Record FileUpload User Event
    1. Navigate to Customization → Scripting → Scripts.
    2. Find the script file titled eXtendFiles Record FileUpload User Event and open it in view mode.
    3. This script will need to be deployed on each record type where the inline upload feature will be used.
    4. Click the Deploy Script button and deploy the script on the Applies To record type, with a Status of Released, and for All Roles as the Audience. Repeat these steps for each inline upload-enabled record.
      Image Placeholder
  2. eXtendFiles Client Script
    1. Navigate to Customization → Scripting → Scripts.
    2. Find the script file titled eXtendFiles Client Script and open it in view mode.
    3. This script will need to be deployed on each record type where the inline upload feature will be used.
    4. Click the Deploy Script button and deploy the script on the Applies To record type, with a Status of Released, and All Roles as the Audience.  Repeat these steps for each inline upload-enabled record.
      Image Placeholder

Additional Configuration

If you are using the "Attaching line item information on eXtendFiles record" feature on your transaction records, you will need to use the eXtendFiles Update Line Attach glom [B] workflow provided with the eXtendFiles bundle.

The purpose of this Workflow is to update the line item information attached to the eXtendFiles record when the line items on your transaction record are updated.

This workflow is pre-configured on the transaction types: Estimate, Sales Order, and Work Order. If you are using this feature on other transaction types, you will need to add those transaction types in the workflow.

It is recommended to make a copy of the bundled workflow and mark the bundled workflow in the non-initiating or suspended state.

Next Steps