Version: eXtendFiles 1.6.5 and above
Audience: Administrator

Preparation

To add public upload functionality to a new record type, you must add three new custom fields to be used by the public upload processes. When creating new fields for use with public upload, ensure that the fields are applied to the record type that you are configuring with the eXtendFiles public upload feature.

  1. A checkbox field to enable the public upload link.
  2. A hyperlink field to store the public upload link.
  3. A free-form text field to store the record's Universally Unique Identifier (UUID).
For standard NetSuite transaction records, such as Sales Orders, Purchase Orders, Invoices, Cash Sales, etc., you can use the included eXtendFiles fields, and new fields do not need to be created as they are already applied. Do not manually apply the existing fields to any other transaction type, as they will be reverted back upon SuiteApp update. We recommend creating separate fields if these fields are not 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

Public Upload Configuration

  1. Go to eXtendTech  eXtendFiles  eXtendFiles Setup and select the Public Upload subtab.
    Image Placeholder
  2. In another browser tab, open the desired record type where you wish to add public upload functionality and create a new checkbox, hyperlink, and free-form text field. Remember, you can skip this step if the record is a native NetSuite transaction record and if it is already applied to your target record type.

    For example: if you wish to enable public upload function on a custom record called "File Feedback", you will create the new three 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 Public Upload URL Field Id. This field will store the generated public upload link.

      Note: In addition to this field, you will need to create an additional field which will be a formula field. It will create a URL dynamically using the uuidrecordtype and recordid fields. You will use this formula field for uploading files through the public upload feature. See Set Static Field values on eXtendFiles during Public Upload for more information.

      Example formula to be used: 
      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  

      If you want to change any eXtendFiles record’s field value upon file upload, you can do so by adding the internal ID of the field followed by the value to be set in the public upload URL formula as mentioned above. 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.

Steps regarding the creation of script deployments is below:

  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.

Note: If you find an existing script deployment on the target record where you are configuring the eXtendFiles public upload feature, make sure that the deployment is deployed, has a status of released, and "All Roles" as the audience.