Ga naar inhoud

Retention Mgt. Pub (Retention Labels)

Document Central biedt openbare functies om een Retention Label op een document te verwijderen of in te stellen. Deze functies zijn beschikbaar in de codeunit "Retention Mgt. Pub" (ID: 5737062) in de namespace Simova.DMS.Feature.Compliance.RetentionLabel.

Aan de volgende vereisten moet worden voldaan:

  • Document Central moet als referentie aanwezig zijn in de extensie.
  • De Compliance-functie is geactiveerd en Retention Labels zijn succesvol ingesteld.

RemoveRetentionLabel

De functie RemoveRetentionLabel verwijdert een Retention Label van een document. Het gedrag is afhankelijk van het repository-type:

  • SharePoint: Verwijdert het Retention Label zowel in Azure als op de Document Entry.
  • Azure Blob Storage: Verwijdert het Retention Label alleen op de Document Entry.

Parameters

Var Naam Gegevenstype Subtype Lengte Beschrijving
Ja ParamRecordSIMDMSDocumentEntry Record "SIM_DMS Document Entry" De Document Entry-record waarvan het Retention Label verwijderd moet worden

Retourwaarde

Gegevenstype Beschrijving
Boolean True als het Retention Label succesvol is verwijderd, False als dat niet het geval is. Bij een fout wordt een Error gegenereerd

Codevoorbeeld

Codevoorbeeld weergeven
AL
var
    LocalRecordSIMDMSDocumentEntry: Record "SIM_DMS Document Entry";
    LocalCodeunitRetentionMgtPub: Codeunit "Retention Mgt. Pub";
    LocalResult: Boolean;
begin
    // De Document Entry ophalen waarvan het Retention Label verwijderd moet worden
    LocalRecordSIMDMSDocumentEntry.Get(...);

    LocalResult := LocalCodeunitRetentionMgtPub.RemoveRetentionLabel(LocalRecordSIMDMSDocumentEntry);
end;

SetRetentionLabel

De functie SetRetentionLabel stelt een Retention Label in op een document. Het gedrag is afhankelijk van het repository-type:

  • SharePoint: Stelt het Retention Label in zowel in SharePoint als op de Document Entry.
  • Azure Blob Storage: Stelt het Retention Label in op de Document Entry en de Document Entry Version.

Parameters

Var Naam Gegevenstype Subtype Lengte Beschrijving
Nee ParamRecordSIMDMSUserSetup Record "SIM_DMS User Setup" De gebruikersinstellingen-record voor authenticatie
Ja ParamRecordSIMDMSDocumentEntry Record "SIM_DMS Document Entry" De Document Entry-record waarop het Retention Label ingesteld moet worden
Nee ParamRetentionLabelText Text De naam van het toe te passen Retention Label
Ja ParamRecordSIMDMSDocumentEntryVersion Record "SIM_DMS Document Entry Version" De Document Entry Version-record (gebruikt voor Azure Blob Storage)

Retourwaarde

Gegevenstype Beschrijving
Boolean True als het Retention Label succesvol is ingesteld, False als dat niet het geval is. Bij een fout wordt een Error gegenereerd

Codevoorbeeld

Codevoorbeeld weergeven
AL
var
    LocalRecordSIMDMSUserSetup: Record "SIM_DMS User Setup";
    LocalRecordSIMDMSDocumentEntry: Record "SIM_DMS Document Entry";
    LocalRecordSIMDMSDocumentEntryVersion: Record "SIM_DMS Document Entry Version";
    LocalCodeunitRetentionMgtPub: Codeunit "Retention Mgt. Pub";
    LocalResult: Boolean;
begin
    // Gebruikersinstellingen ophalen voor authenticatie
    LocalRecordSIMDMSUserSetup.Get(UserId());

    // De Document Entry ophalen waarop het Retention Label ingesteld moet worden
    LocalRecordSIMDMSDocumentEntry.Get(...);

    // De Document Entry Version ophalen
    LocalRecordSIMDMSDocumentEntryVersion.Get(...);

    LocalResult := LocalCodeunitRetentionMgtPub.SetRetentionLabel(
        LocalRecordSIMDMSUserSetup,
        LocalRecordSIMDMSDocumentEntry,
        'Uw Retention Label Naam',
        LocalRecordSIMDMSDocumentEntryVersion
    );
end;