Table of Contents

KVSDMSDocumentsFactboxMgt

Summary: Manages the documents factbox functionality for DMS integration.

Procedures

ShouldShowFactboxForTable(Variant) : Boolean

Summary: Checks if the factbox shall be displayed for the given record.

procedure ShouldShowFactboxForTable(RecordVariant: Variant): Boolean

Parameters:

  • RecordVariant: Variant that specifies the record to be used for the check.

Returns: Return variable result of type Boolean defines if the factbox should be displayed.

ShouldShowFactboxForTable(Integer) : Boolean

Summary: Checks if the factbox shall be displayed for the given table id.

procedure ShouldShowFactboxForTable(NewTableId: Integer): Boolean

Parameters:

  • NewTableId: Integer that specifies the table id used for the check.

Returns: Return variable result of type Boolean defines if the factbox should be displayed.

SetForCompanyCode(Text) :

Summary: Set the Company Code to handle values for.

procedure SetForCompanyCode(NewValue: Text): 

Parameters:

  • NewValue: Text that specifies the company code.

GetSourceRecord() : RecordRef

Summary: Gets the Source Record Record Reference that has been set by the Factbox Page Integration. This procedure can be used within event subscribers in order to create individual factbox experiences.

procedure GetSourceRecord(): RecordRef

Returns: The Record Reference of the Source Record for the current factbox.

GetStorageDefinition() : Record

procedure GetStorageDefinition(): Record KVSDMSStorageDefinition

GetDocumentEnvelopeStorageDefinition() : Record

procedure GetDocumentEnvelopeStorageDefinition(): Record KVSDMSStorageDefinition

Events

OnBeforeShouldShowFactboxForTable(Integer, Text, Boolean, Boolean) :

Summary: Raised before determining whether the factbox should be shown for a given table.

[IntegrationEvent(false, false)]
local procedure OnBeforeShouldShowFactboxForTable(NewTableId: Integer; RunForCompanyCode: Text; var Result: Boolean; var IsHandled: Boolean): 

Parameters:

  • NewTableId: The table ID to check.
  • RunForCompanyCode: The company code to run for.
  • Result: The result indicating whether to show the factbox.
  • IsHandled: Indicates whether the event has been handled.

OnAfterSetSourceRecord(Variant, Record KVSDMSFileBuffer, Boolean, Boolean, Boolean, Record KVSDMSStorageDefinition, Record KVSDMSDocSearchDefinition, Record KVSDMSDisplayDefinition, Boolean, Boolean, Text) :

Summary: Raised after setting the source record for the factbox.

[IntegrationEvent(false, false)]
local procedure OnAfterSetSourceRecord(RecVariant: Variant; var TempFileBuffer: Record "KVSDMSFileBuffer" temporary; var UploadAllowed: Boolean; var ManualTagsExist: Boolean; var FilePackExists: Boolean; var StorageDefinition: Record "KVSDMSStorageDefinition"; var SearchDefinition: Record "KVSDMSDocSearchDefinition"; var DisplayDefinition: Record "KVSDMSDisplayDefinition"; var IsSourceRecordInitialized: Boolean; var DontReloadFilesForCurrentRecord: Boolean; RunForCompanyCode: Text): 

Parameters:

  • RecVariant: The source record variant.
  • TempFileBuffer: The temporary file buffer record.
  • UploadAllowed: Indicates whether upload is allowed.
  • ManualTagsExist: Indicates whether manual tags exist.
  • FilePackExists: Indicates whether a file pack exists.
  • StorageDefinition: The storage definition record.
  • SearchDefinition: The document search definition record.
  • DisplayDefinition: The display definition record.
  • IsSourceRecordInitialized: Indicates whether the source record is initialized.
  • DontReloadFilesForCurrentRecord: Indicates whether to skip reloading files for the current record.
  • RunForCompanyCode: The company code to run for.

OnBeforeLoadFiles(Record KVSDMSFileBuffer, RecordRef, Boolean, Record KVSDMSStorageDefinition, Record KVSDMSDocSearchDefinition, Boolean, Boolean, Text, Boolean) :

Summary: Raised before loading files for the factbox.

[IntegrationEvent(false, false)]
local procedure OnBeforeLoadFiles(var TempFileBuffer: Record "KVSDMSFileBuffer" temporary; SourceRecord: RecordRef; IsSourceRecordInitialized: Boolean; StorageDefinition: Record "KVSDMSStorageDefinition"; SearchDefinition: Record "KVSDMSDocSearchDefinition"; DontReloadFilesForCurrentRecord: Boolean; SearchResultsLoaded: Boolean; RunForCompanyCode: Text; var IsHandled: Boolean): 

Parameters:

  • TempFileBuffer: The temporary file buffer record.
  • SourceRecord: The source record reference.
  • IsSourceRecordInitialized: Indicates whether the source record is initialized.
  • StorageDefinition: The storage definition record.
  • SearchDefinition: The document search definition record.
  • DontReloadFilesForCurrentRecord: Indicates whether to skip reloading files for the current record.
  • SearchResultsLoaded: Indicates whether search results have been loaded.
  • RunForCompanyCode: The company code to run for.
  • IsHandled: Indicates whether the event has been handled.

OnAfterLoadFiles(Record KVSDMSFileBuffer, Boolean, Record KVSDMSStorageDefinition, Record KVSDMSDocSearchDefinition, Boolean, Boolean, Text) :

Summary: Raised after loading files for the factbox.

[IntegrationEvent(false, false)]
local procedure OnAfterLoadFiles(var TempFileBuffer: Record "KVSDMSFileBuffer" temporary; IsSourceRecordInitialized: Boolean; StorageDefinition: Record "KVSDMSStorageDefinition"; SearchDefinition: Record "KVSDMSDocSearchDefinition"; DontReloadFilesForCurrentRecord: Boolean; SearchResultsLoaded: Boolean; RunForCompanyCode: Text): 

Parameters:

  • TempFileBuffer: The temporary file buffer record.
  • IsSourceRecordInitialized: Indicates whether the source record is initialized.
  • StorageDefinition: The storage definition record.
  • SearchDefinition: The document search definition record.
  • DontReloadFilesForCurrentRecord: Indicates whether to skip reloading files for the current record.
  • SearchResultsLoaded: Indicates whether search results have been loaded.
  • RunForCompanyCode: The company code to run for.

OnBeforeUploadFile(Text, Codeunit Temp Blob, RecordRef, Record KVSDMSStorageDefinition, Boolean, Text) :

[IntegrationEvent(false, false)]
local procedure OnBeforeUploadFile(var FileName: Text; var TempBlob: Codeunit "Temp Blob"; SourceRecord: RecordRef; StorageDefinition: Record "KVSDMSStorageDefinition"; IsDragAndDrop: Boolean; RunForCompanyCode: Text): 

OnBeforeUploadFileByStream(Text, InStream, RecordRef, Record KVSDMSStorageDefinition, Boolean, Text) :

Summary: Raised before uploading a file by stream.

[IntegrationEvent(false, false)]
local procedure OnBeforeUploadFileByStream(var FileName: Text; var FileInStream: InStream; SourceRecord: RecordRef; StorageDefinition: Record "KVSDMSStorageDefinition"; IsDragAndDrop: Boolean; RunForCompanyCode: Text): 

Parameters:

  • FileName: The name of the file to upload.
  • FileInStream: The input stream containing the file content.
  • SourceRecord: The source record reference.
  • StorageDefinition: The storage definition record.
  • IsDragAndDrop: Indicates whether the upload is from drag and drop.
  • RunForCompanyCode: The company code to run for.

OnBeforeShowFileOrDirectory(Record KVSDMSFileBuffer, Boolean, Text, Boolean) :

Summary: Raised before showing a file or directory.

[IntegrationEvent(false, false)]
local procedure OnBeforeShowFileOrDirectory(var TempFileBuffer: Record "KVSDMSFileBuffer" temporary; ShowFolderForFiles: Boolean; RunForCompanyCode: Text; var IsHandled: Boolean): 

Parameters:

  • TempFileBuffer: The temporary file buffer record.
  • ShowFolderForFiles: Indicates whether to show the folder for files.
  • RunForCompanyCode: The company code to run for.
  • IsHandled: Indicates whether the event has been handled.

OnBeforeDownloadFile(Record KVSDMSFileBuffer, Text, Boolean) :

Summary: Raised before downloading a file.

[IntegrationEvent(false, false)]
local procedure OnBeforeDownloadFile(var TempFileBuffer: Record "KVSDMSFileBuffer" temporary; RunForCompanyCode: Text; var IsHandled: Boolean): 

Parameters:

  • TempFileBuffer: The temporary file buffer record.
  • RunForCompanyCode: The company code to run for.
  • IsHandled: Indicates whether the event has been handled.

OnBeforeEMailFile(Record KVSDMSFileBuffer, Text, Boolean) :

Summary: Raised before emailing a file.

[IntegrationEvent(false, false)]
local procedure OnBeforeEMailFile(var TempFileBuffer: Record "KVSDMSFileBuffer" temporary; RunForCompanyCode: Text; var IsHandled: Boolean): 

Parameters:

  • TempFileBuffer: The temporary file buffer record.
  • RunForCompanyCode: The company code to run for.
  • IsHandled: Indicates whether the event has been handled.

OnBeforeSendEMailFile(Record KVSDMSFileBuffer, Record Email Item, Text, Boolean) :

Summary: Raised before sending an email file.

[IntegrationEvent(false, false)]
local procedure OnBeforeSendEMailFile(var TempFileBuffer: Record "KVSDMSFileBuffer" temporary; var TempEmailItem: Record "Email Item" temporary; RunForCompanyCode: Text; var IsHandled: Boolean): 

Parameters:

  • TempFileBuffer: The temporary file buffer record.
  • TempEmailItem: The temporary email item record.
  • RunForCompanyCode: The company code to run for.
  • IsHandled: Indicates whether the event has been handled.

OnAfterSetFilterAvailableSearchDefinition(RecordRef, Record KVSDMSDocSearchDefinition, Text) :

Summary: Raised after setting filter for available search definition.

[IntegrationEvent(false, false)]
local procedure OnAfterSetFilterAvailableSearchDefinition(SourceRecord: RecordRef; var AvailableSearchDefinition: Record "KVSDMSDocSearchDefinition"; RunForCompanyCode: Text): 

Parameters:

  • SourceRecord: The source record reference.
  • AvailableSearchDefinition: The available search definition record.
  • RunForCompanyCode: The company code to run for.

OnBeforeShowDocumentSearch(RecordRef, Record KVSDMSStorageDefinition, Record KVSDMSDocSearchDefinition, Page KVSDMSDocumentsSearch) :

[IntegrationEvent(false, false)]
local procedure OnBeforeShowDocumentSearch(SourceRecord: RecordRef; StorageDefinition: Record "KVSDMSStorageDefinition"; SearchDefinition: Record "KVSDMSDocSearchDefinition"; var DocumentSearch: Page "KVSDMSDocumentsSearch"): 

OnShowFileContentWithDocumentLinkDisplayTypeCaseElse(Record KVSDMSFileBuffer) :

Summary: Raised when showing file content with document link display type case else.

[IntegrationEvent(false, false)]
local procedure OnShowFileContentWithDocumentLinkDisplayTypeCaseElse(var TempFileBuffer: Record "KVSDMSFileBuffer" temporary): 

Parameters:

  • TempFileBuffer: The temporary file buffer record.