deleteFile

deleteFile(options)

Method Description

This function allows you to delete a file in an external file storage location.

Supported Script Types

SuiteScript 2.1
Server-side Scripts: User Event, Suitelet, RESTlet, Map/Reduce, Scheduled, Workflow Action

Limitations

None

Module

b4cd-file-api-lib.js
See notes on how to load this module: FileSync API for SuiteScript

Since

FileSync 0.5.2

Parameters

Note: The options parameter is a JavaScript object.

PropertyTypeRequiredDescriptionSince
options.recordTypeConfigId
integerrequiredInternal ID of the FileSync Record Type Configuration record (customrecord_b4cd_record_type_config).
*Optional - Can use options.connectionId as below
0.5.2
options.fileUniqueId
stringrequired*The unique ID of the file for which the content is being requested. This value is generally retrieved by making a call to the getRecordFolderContents or the getFolderContentsByPath method.
*Optional - Can use options.fileUniquePath as below
0.5.2
options.filePath

string

optional

Server relative path of the file in SharePoint

0.5.2

Errors

Error CodeDetails
MISSING_REQD_ARGUMENT

A required argument is missing or undefined.

Example Usage

let releteResult = fileapi.deleteFile({ 

    fileUniqueId:'d0b1d53c-079f-4497-aa8c-9892fae706b8'

    recordTypeConfigId: 35 })

Was this article helpful?