Codeunit 9071 Check Sales Document

Base Application, Microsoft.Sales.Document

src/Layers/W1/BaseApp/Sales/Document/CheckSalesDocument.Codeunit.al29 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.Document;using Microsoft.Sales.Posting;/// <summary>/// Validates a sales document header before posting to ensure data integrity./// </summary>codeunit 9071 "Check Sales Document"{    TableNo = "Sales Header";    trigger OnRun()    begin        RunCheck(Rec);    end;    local procedure RunCheck(var SalesHeader: Record "Sales Header")    var        SalesPost: Codeunit "Sales-Post";    begin        SalesPost.PrepareCheckDocument(SalesHeader);        SalesPost.CheckSalesDocument(SalesHeader);    end;}