Version: eXtendFiles 1.6.5 and above
Audience: Administrator

Use Cases

  • Enable file uploads using the eXtendFiles inline upload feature.

Summary

The eXtendFiles Inline Upload feature lets you upload files directly from your NetSuite records using a drag-and-drop area on the record's form. Additionally, the inline upload feature can add attributes (metadata) to the uploaded file, either optionally or mandatorily.
Image Placeholder
The inline upload feature is available in View mode and Edit mode for existing records. Create mode is not supported at this time.

Configuration

eXtendFiles Setup Page

A configuration in the eXtendFiles Setup page needs to be configured to enable this feature for a record type.
  1. Navigate to the eXtendFiles Setup page:
    1. Go to eXtendTech eXtendFiles Setup.
  2. Access Inline Links & Uploads:
    1. Go to the Inline Links & Uploads subtab.
    2. Select the FileUpload on Record Settings sublist.
      Image Placeholder
  3. Configure record types:
    1. For each record type where the inline upload feature is to be enabled, configure an entry in the sublist using the details below:
 Fields
Description 
Record Type
The record type where the inline upload feature will be enabled.

For a list of valid native NetSuite record types, please click on this link to refer to the NetSuite records browser.
eXtendFiles Reference FieldID
The custom field on the eXtendFiles record which refers to the record on which you are configuring the inline upload feature. This field 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. Ensure the Inline HTML field is visible on the custom forms for the target record type.
Folder Information Record Field ID
Specify the field value, based on the eXtendFiles - Folder Information custom record type, which will be used for selecting 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
Enable this preference to show the inline upload feature when the record is in View Mode. By default, inline uploads are only enabled in Edit Mode.
Upload iFrame Height (Pixel)
Adjust the height (in pixels) for the height of the drag-and-drop file upload area.
Do Not Use JS Script For Iframe
Required for some specific record types which do not allow client scripts to load iframe content. Examples include Project/Job, Job Task, Project Task, and Timesheet.
Upload Query Param Data Set (JSON Stringified)
Specify any fieldIDs and field values to be applied to eXtendFiles records uploaded via the inline upload feature using JSON Stringified format.

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 field IDs along with the source list and the label you want to show in 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]] }]

Avoid any leading or trailing whitespace when copying and pasting field IDs in NetSuite as they may be unintentionally included and prevent the configuration from being applied successfully.

Additional Custom eXtendFiles Attribute details:
  • If you want to mark a field as mandatory before uploading files, add the "required" attribute while specifying the custom attribute field: required=true.
  • If a field is defined in both UPLOAD QUERY PARAM DATASET (JSON STRINGIFIED) and in the CUSTOM EXTENDFILES ATTRIBUTE, the hardcoded value defined in UPLOAD QUERY PARAM DATASET (JSON STRINGIFIED) is ignored.
  • Only drop-down fields (single and multi-select) 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 uploader. 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.
  • You can  specify filter expressions to filter the dropdown list values using the same filter expressions that are supported by NetSuite.
  • If you want to clear the value in the selected field, click the Clear Field button.
  • If you want to include line level information the uploaded files, 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 the "UPLOADED FILES DETAILSfield. 
Example custom attribute configuration:
[{ "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

To ensure the inline upload feature operates correctly, script deployments need to be created as follows:

eXtendFiles Record FileUpload User Event

  1. Go to Customization → Scripting → Scripts.
  2. Open the script file titled eXtendFiles Record FileUpload User Event in view mode.
  3. Deploy the script on each record type where the inline upload feature will be used.
  4. This script will need to be deployed on each record type where the inline upload feature will be used.
  5. Click Deploy Script and deploy it on each target record type with a Status of Released, for All Roles as the Audience.
    Image Placeholder

eXtendFiles Client Script

  1. Go to Customization → Scripting → Scripts.
  2. Open the script file titled eXtendFiles Client Script in view mode.
  3. Deploy the script on each record type where the inline upload feature will be used.
  4. This script will need to be deployed on each record type where the inline upload feature will be used.
  5. Click Deploy Script and deploy it on each target record type with a Status of Released, for All Roles as the Audience.
    Image Placeholder

Additional Configuration

If using the "Attaching line item information on eXtendFiles record" feature on your transaction records, use the eXtendFiles Update Line Attach glom [B] workflow provided with the eXtendFiles bundle. This workflow updates line item information attached to the eXtendFiles record when the line items on your transaction record are updated.

This workflow is configured for Estimate (Quote), Sales Order, and Work Order transaction types. Add other transaction types if needed in a copy of the workflow.

Next Steps