DeleteAttachment
Deletes an attachment located in one of your Smartsheet sheets.
Stored Procedure-Specific Information
Executing this procedure can have different effects, based on the values specified in the procedure parameters:- If the value specified in the AttachmentId parameter corresponds to the identifier of a specific version of the attachment, then only that version is deleted.
- If the value specified in the AttachmentId parameter corresponds to the identifier of the attachment and that attachment has only 1 version, then the attachment is deleted completely.
- If the value specified in the AttachmentId parameter corresponds to the identifier of the attachment and the DeleteAllVersions parameter is set to true, then the attachment is deleted completely.
To execute this procedure, enter:
EXEC DeleteAttachment SheetId='8449165781585796', AttachmentId='8812618818817924'
Input
| Name | Type | Required | Description |
| SheetId | String | True | The unique identifier of the sheet containing the attachment to be deleted. |
| AttachmentId | String | True | The unique identifier of the attachment or attachment version to be deleted. |
| DeleteAllVersions | Boolean | False | Boolean value indicating whether to delete all versions of the attachment, which would delete the attachment itself completely as well. |
Result Set Columns
| Name | Type | Description |
| Success | Boolean | Boolean value indicating whether the deletion operation was successful. Returns 'true' if the attachment (or version) was deleted, and 'false' otherwise. |