Codeunit 106 Ledg. Entry-Track Changes

App
Base Application
Namespace
Microsoft.Sales.Receivables
Versions
23-28

Versions171819202122232425262728

Source29

Source in 29

src/Layers/W1/BaseApp/Sales/Receivables/LedgEntryTrackChanges.Codeunit.al24 lines, Copyright (c) Microsoft Corporation. MIT

// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Sales.Receivables;

using Microsoft.Purchases.Payables;
using System.Diagnostics;

/// <summary>
/// Enables change log tracking for customer and vendor ledger entry modifications by marking these tables as always logged.
/// </summary>
codeunit 106 "Ledg. Entry-Track Changes"
{
    EventSubscriberInstance = Manual;

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Change Log Management", 'OnAfterIsAlwaysLoggedTable', '', false, false)]
    local procedure OnAfterIsAlwaysLoggedTable(TableID: Integer; var AlwaysLogTable: Boolean)
    begin
        if TableID in [Database::"Vendor Ledger Entry", Database::"Cust. Ledger Entry"] then
            AlwaysLogTable := true;
    end;
}