Codeunit 20531 Subc. Vendor Extension

Subcontracting, Microsoft.Manufacturing.Subcontracting

src/Apps/W1/Subcontracting/App/src/MasterData/SubcVendorExtension.Codeunit.al36 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.Manufacturing.Subcontracting;using Microsoft.Purchases.Vendor;codeunit 20531 "Subc. Vendor Extension"{    [EventSubscriber(ObjectType::Table, Database::Vendor, OnAfterDeleteEvent, '', false, false)]    local procedure OnAfterDeleteVendor(var Rec: Record Vendor; RunTrigger: Boolean)    var        SubcontractorPrice: Record "Subcontractor Price";#if not CLEAN29#pragma warning disable AL0432        SubcFeatureFlagHandler: Codeunit "Subc. Feature Flag Handler";#pragma warning restore AL0432#endif    begin#if not CLEAN29#pragma warning disable AL0432        if not SubcFeatureFlagHandler.IsSubcontractingEnabled() then#pragma warning restore AL0432            exit;#endif        if Rec.IsTemporary() then            exit;        if not RunTrigger then            exit;        SubcontractorPrice.DeletePricesForVendor(Rec."No.");    end;}