Skip to content

Codeunit WSB_DCASharePointAPI

Exposes procedure to make API requests to SharePoint (the Graph API).

Properties

Name Value
Access Public

Methods

wgFncDeleteFile(Interface::WSB_IRESTClientSetup, Text, Text, Text):Boolean

Deletes a file from SharePoint.

Parameters

Type Name Description
Interface "WSB_IRESTClientSetup" pWSB_IRESTClientSetup The REST Client Setup.
Text pSiteID Site ID
Text pDriveID Drive ID
Text pItemPath Item (File) Path

Returns

Type Description
Boolean true iff successful

wgFncDownloadFile(Interface::WSB_IRESTClientSetup, Text, Text, Text, Codeunit::System#Utilities#Temp Blob@):Boolean

Downloads a file from SharePoint.

Parameters

Type Name Description
Interface "WSB_IRESTClientSetup" pWSB_IRESTClientSetup The REST Client Setup.
Text pSiteID Site ID
Text pDriveID Drive ID
Text pItemPath Item (File) Path
Codeunit "Temp Blob" vCduTempBlob VAR Codeunit "Temp Blob".

Returns

Type Description
Boolean true iff successful

wgFncFetchDrives(Interface::WSB_IRESTClientSetup, Text, WSB_DCASharePointDrive@):Boolean

Retrieves the available drives for a site.

Parameters

Type Name Description
Interface "WSB_IRESTClientSetup" pWSB_IRESTClientSetup The REST Client Setup.
Text pSiteID Site ID
Record "WSB_DCASharePointDrive" vRecWSB_DCASharePointDrive Record set storing the info for the resulting drives.

Returns

Type Description
Boolean true iff successful.

wgFncFetchSites(Interface::WSB_IRESTClientSetup, WSB_DCASharePointSite@):Boolean

Retrieves the available sites.

Parameters

Type Name Description
Interface "WSB_IRESTClientSetup" pWSB_IRESTClientSetup The REST Client Setup.
Record "WSB_DCASharePointSite" vRecWSB_DCASharePointSite Record set holding the info for the resulting sites.

Returns

Type Description
Boolean true iff successful

wgFncRefreshDrives(Interface::WSB_IRESTClientSetup, Text):Boolean

Triggers a refresh of the available drives for a site.

Parameters

Type Name Description
Interface "WSB_IRESTClientSetup" pWSB_IRESTClientSetup The REST Client Setup.
Text pSiteID The Site ID.

Returns

Type Description
Boolean true iff successful

wgFncRefreshSites(Interface::WSB_IRESTClientSetup):Boolean

Triggers a refresh of the available sites.

Parameters

Type Name Description
Interface "WSB_IRESTClientSetup" pWSB_IRESTClientSetup The REST Client Setup.

Returns

Type Description
Boolean true iff successful

wgFncUploadFile(Interface::WSB_IRESTClientSetup, Text, Text, Text, Codeunit::System#Utilities#Temp Blob):Boolean

Uploads a file to SharePoint.

Parameters

Type Name Description
Interface "WSB_IRESTClientSetup" pWSB_IRESTClientSetup The REST Client Setup.
Text pSiteID Site ID
Text pDriveID Drive ID
Text pRemoteFilePath Remote File Path for the new item.
Codeunit "Temp Blob" pCduTempBlob Temp Blob holding the file.

Returns

Type Description
Boolean true iff successful.