AddAttachment
SharePoint のリストアイテムに添付ファイルを追加します。SharePoint レコードに補足ファイルをリンクする場合に便利です。
Stored Procedure-Specific Information
The AddAttachment stored procedure adds an attachment to a list item in SharePoint. You can specify the attachment content either by providing a local file path using the File parameter, or by providing the content directly using the Content parameter.To add an attachment from a local file, enter:
EXEC AddAttachment File = 'C:\path\to\AddAttachment.txt', List = 'TestList', ItemID = '1', FileName = 'AddAttachment.txt';
The stored procedure returns the URL of the uploaded attachment on success.
Input
| Name | Type | Required | Description |
| File | String | False | 添付ファイルとしてアップロードするローカルファイルのフルパス。 |
| List | String | True | 添付ファイルが追加されるSharePoint リストの名前。 |
| ItemID | String | True | 添付ファイルが追加されるリストアイテムの一意の識別子。 |
| FileName | String | False | 添付ファイルとしてアップロードされるファイルの名前で、拡張子も含まれます(例:'document.pdf')。'Content' がnull でない場合に使用します。 |
Result Set Columns
| Name | Type | Description |
| Success | Boolean | 添付ファイルが正常に追加されたかどうかを示します。成功した場合は'true' を、失敗した場合は'false' を返します。 |
| URL | String | SharePoint で新しく作成された添付ファイルのURL。 |