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:
- 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.
- 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.
- 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.