Codeunit 510 Change Log Entry - Delete, source in 29

Source29

src/Layers/W1/BaseApp/System/ChangeLog/ChangeLogEntryDelete.Codeunit.al16 lines, Copyright (c) Microsoft Corporation. MIT

namespace System.Diagnostics;

codeunit 510 "Change Log Entry - Delete"
{
    Access = Internal;
    Permissions = TableData "Change Log Entry" = rd;
    TableNo = "Change Log Entry";

    trigger OnRun()
    begin
        Rec.SetRange("Field Log Entry Feature", "Field Log Entry Feature"::"Change Log");
        Rec.SetRange(Protected, true);
        Rec.Delete(); // do not call trigger as that will fail for protected entries
    end;
}