Version: eXtendFiles 1.6.5 and above
Audience: Administrator

Preparation

To enable public upload functionality for a new record type, you need to add three custom fields for use in the public upload process:
  1. A checkbox field to enable the public upload link on the target record.
  2. A hyperlink field to store the generated public upload link.
  3. A free-form text field to store the record's Universally Unique Identifier (UUID).
When creating these fields, ensure they're applied to the record type you're configuring with the eXtendFiles public upload feature.

For standard NetSuite transaction records with pre-applied eXtendFiles fields—such as Opportunities, Estimates, Sales Orders, Invoices, Cash Sales, Purchase Orders, and Vendor Bills—you can use the included eXtendFiles fields without creating new ones.

We recommend creating separate fields when these aren't already applied to your transaction type:
  • Included transaction hyperlink field: custbody_extend_public_upload_link
  • Included transaction checkbox field: custbody_extend_generate_public_upload
  • Included transaction free-form text field: custbody_extend_approval_id
Don't manually apply existing fields to additional record types, as they'll revert during SuiteApp updates.

Public Upload Configuration

  1. Go to eXtendTech  eXtendFiles  eXtendFiles Setup and select the Public Upload subtab.
    Image Placeholder
  2. In a new browser tab, open the desired record type where you want to add public upload functionality. Create a new checkbox, hyperlink, and free-form text field. Note: You can skip this step if these fields are already applied to your target record type.

    For example: If you want to enable the public upload function on a custom record called "File Feedback," create the three new fields on the "File Feedback" custom record type.

    The screenshot below shows a mixture of different standard types and custom record types, along with their associated checkbox, hyperlink, and free-form text fields.
    Image Placeholder
  3. In the Public Upload Record Type Setting sublist, configure the information below for each record type to be enabled with public upload.
    1. RECORD TYPE ID
      Specify the Record Type Id for the record. Example: salesorder
    2. FILE UPLOAD TITLE
      Specify the File Upload Title which will be displayed on the public upload webpage. This will show to someone who is performing a file upload.
      Image Placeholder
    3. RECORD ID FIELD
      Specify the Record Id Field to be displayed on public upload webpage header. This will show to someone who is performing a file upload. Example: tranidImage Placeholder
    4. GENERATE PUBLIC URL FIELD ID (MUST BE CHECKBOX)
      Specify the Generate Public URL field which will be used to generate the public upload link.
    5. FOLDER INFORMATION RECORD FIELD ID
      When using Configure Folder Information records to Upload Files to Specific Folders in eXtendFiles, specify the
      eXtendFiles - Folder Information field reference to use for public upload. This is applicable only to Amazon S3, Oracle Object Cloud, and Microsoft Azure.

      Included 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.
    6. UUID FIELD ID
      Specify the UUID Field Id. This field will store the UUID which will be used to generate a public upload link.
    7. PUBLIC UPLOAD URL FIELD ID 
      Specify the field ID for storing the generated public upload link. You'll also need to create a formula field to dynamically generate the URL using the UUID, record type, and record ID.

      Basic formula structure:
      CASE WHEN {BASE URL LINK} IS NOT NULL THEN CONCAT({BASE URL LINK}, CONCAT(CONCAT('&id=', {id}), CONCAT('&rectype=', {type}))) ELSE  '' END

      In the case of a custom record, replace Record Type with your custom record’s record type ID.  You can find the custom record type ID from your records URL or on the custom record itself.

      The generated URL will be like: https://hostname.suitextend.net/v1/approval/order/9200f816-6a88-4ba9-848e-8a9faafc2d50?id=39776&rectype=salesord  

      To set specific field values during upload, add them to the URL formula. For example, to set the “eXtendFiles - File Type” field to “Final Artwork”, for which the field ID is “custrecord_extfile_type_custlist” and its list value is “4”, you will create your formula field as:
      CASE WHEN {BASE URL LINK} IS NOT NULL THEN CONCAT({BASE URL LINK }, CONCAT('&id=', CONCAT({id}, CONCAT('&rectype=', CONCAT({type}, CONCAT('&custrecord_extfile_type_custlist=', '4')))))) ELSE '' END

      The final generated URL be:  https://hostname.suitextend.net/v1/approval/order/9200f816-6a88-4ba9-848e-8a9faafc2d50?id=39776&rectype=salesord&custrecord_extfile_type_custlist=4 

      Note: In the case of a select field, you will have to provide the option’s list value instead of its name.
    8. EXTENDFILE RECORD FIELD ID
      Specify the eXtendFiles Record Field Id used to reference the parent record for the eXtendFiles record being created using public upload. This is a field reference to the record against which your eXtendFiles record will be attached. See Add eXtendFiles to a New Record Type for more information on how to create this field reference.
    9. SAVED SEARCH ID
      Specify a Saved Search Id here.

      To do this:
      Create a saved search for the record type and using the criteria to filter to the record(s) related to that specific record type. This saved search should be created using the same eXtendFiles Record Type and must include the record type field created on eXtendFiles the record in its filter criteria.

      Example:
      If you are adding public upload to the "File Feedback" custom record, enter the record reference field from "EXTENDFILE RECORD FIELD ID" in the criteria of this saved search so that it only returns eXtendFiles associated with that record type.
    10. MAX PUBLIC UPLOAD LIMIT
      Specify the maximum number of files that are allowed to be uploaded on your record. If no value is specified, a default of 10 files will be applied. 

      Note: Specify a value of 1000 if you want to let your users upload any number of files.
    11. CUSTOM EXTENDFILES ATTRIBUTE
      Similar to the inline upload feature
      , specify any eXtendFiles record field ID along with the source list and the label you want to show on the public upload page. See Working with Custom eXtendFiles Attributes for more information.
  4. Customize the custom form for your record type to show the new fields created in the "Preparation" section.
  5. Confirm that the custom role configured for use with eXtendFiles has access to the underlying record type where public upload is being enabled.

    Note: If the permissions for your record type are not included in the custom role being used for eXtendFiles, you will receive a "No Record Found" error while accessing a public upload link.

Public Upload Script Deployment

You will add a new script deployment after completing the configuration steps above. This will enable the record to execute the necessary scripts on the new record.
  1. Go to Customization → Scripting → Scripts.
  2. Find the script file titled eXtendFiles Public Upload User Event and view it.
  3. This script will need to be deployed on each record type where the public 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 record which needs the Public Upload feature enabled.
    Image Placeholder
Note: If you find an existing script deployment on the target record where you are configuring the eXtendFiles public upload feature, you only need to make sure that it is deployed.