File operations supported in SOAP

The following operations can be used with the file record.

  • add
  • addList
  • delete
  • deleteList
  • get
  • getDeleted
  • getList
  • getSavedSearch
  • getSelectValue
  • search
  • update
  • updateList
  • upsert
  • upsertList

When you add a file, make note of the following points:

  1. You must always specify a value for the name field. If you do not specify a file name, the system returns an error. This behavior differs from the UI, where the record’s name field is automatically set to the name of the file.
  2. You must include a value for the attachFrom enumeration. Use _computer if you are uploading a local file. Use _web if you are uploading a file from the internet.
  3. The maximum file size is 10 MB.

If you want to retrieve data about a file record and the file that it represents, be aware of the following:

  • The only way to retrieve the content of an uploaded file is by using a single get operation. When using either the getList or search operation, NetSuite returns details about the file record, but not the content of the file that was uploaded.
  • When the content of a file is returned, it is in base64Binary format.
  • During a search, the bodyFieldsOnly search preference has no bearing on file content.

Leave a comment

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