<< Click to Display Table of Contents >> Navigation: Zetadocs SDK Guide > Zetadocs SDK API > Zetadocs Interface |
Zetadocs Interface Codeunit
The Zetadocs Interface codeunit exposes procedures that allow you to use the Zetadocs functionality.
Method name |
Description |
---|---|
ArchiveViaZetadocs(FileName, FileData, RecordId) |
Archive the provided data against the record. |
TryArchiveViaZetadocs(FileName, FileData, RecordId) |
Tries to archive the provided data against the record. Returns true if the operation succeeds. |
SearchViaZetadocs(RecordId, List of [Dictionary of [Text, Text]]) |
Search for related Documents. |
TrySearchViaZetadocs(RecordId, List of [Dictionary of [Text, Text]]): Boolean |
Tries to search for documents related to the RecordID provided. Returns true if the operation succeeds. |
This methods gives the ability to archive a file problematically using the Zetadocs functionality similarly as if using Drag and Drop.
Syntax
Archive(FileName: Text; FileDataAsBase64String: Text; RecordId: RecordId)
Parameters
FileName
Type: Text
The name of the file to be archived, including the extension. The same extensions restrictions as when using the Zetadocs Factbox will be in place.
FileDataAsBase64String
Type: Text
The content of the file to be archived. The data must be formated as a Base64 string. The same file size restriction as when using the Zetadocs Factbox will be in place.
RecordId
Type: RecordId
The identifier of the Business Central record to be archived against.
This methods gives the ability to archive a file problematically using the Zetadocs functionality similarly as if using Drag and Drop.
Syntax
Archive(FileName: Text; FileDataAsBase64String: Text; RecordId: RecordId) WasArchiveSucess: Boolean
Parameters
FileName
Type: Text
The name of the file to be archived, including the extension. The same extensions restrictions as when using the Zetadocs Factbox will be in place.
FileDataAsBase64String
Type: Text
The content of the file to be archived. The data must be formated as a Base64 string. The same file size restriction as when using the Zetadocs Factbox will be in place.
RecordId
Type: RecordId
The identifier of the Business Central record to be archived against.
Return Value
WasArchiveSucess
Type: Boolean
Indicates if the archiving to SharePoint was successfull.
Search for documents related to the RecordID provided.
Syntax
Search(recordIds: List of [recordId]; var searchResultDictionary: List of [Dictionary of [Text, Text]])
Search(recordId: recordId; var searchResultDictionary: List of [Dictionary of [Text, Text]])
Parameters
recordIds
Type: List of [RecordId]
This list of Business Central records will be used to search for linked documents in SharePoint.
recordId
Type: RecordId
This Business Central record will be used to search for linked documents in SharePoint.
searchResultDictionary
Type: List of [Dictionary of [Text, Text]]
You should iterate over the list to retrieve a further dictionary, containing the metadata for the related file. The currently available metadata is as follows:
Modified, FileName, Url, DocumentReference, DocumentType.
This method gives you the ability to retrieve the list of documents from SharePoint that are associated with the Business Central records. For performance reasons it is best to build up a list of RecordIds then perform the search once.
Syntax
TrySearch(recordIds: List of [recordId]; var searchResultDictionary: List of [Dictionary of [Text, Text]]) WasSearchSucess: Boolean
TrySearch(recordId: recordId; var searchResultDictionary: List of [Dictionary of [Text, Text]]) WasSearchSucess: Boolean
Parameters
recordIds
Type: List of [RecordId]
This list of Business Central records will be used to search for linked documents in SharePoint.
recordId
Type: RecordId
This Business Central record will be used to search for linked documents in SharePoint.
searchResultDictionary
Type: List of [Dictionary of [Text, Text]]
You should iterate over the list to retrieve a further dictionary, containing the metadata for the related file. The currently available metadata is as follows:
Modified, FileName, Url, DocumentReference, DocumentType.
Return Value
WasSearchSucess
Type: Boolean
Indicates if the search to SharePoint was successfull.