Table extension 8009 Usage Based Item Vendor

Subscription Billing, Microsoft.SubscriptionBilling

src/Apps/W1/Subscription Billing/App/Usage Based Billing/TableExtensions/UsageBasedItemVendor.TableExt.al31 lines, Copyright (c) Microsoft Corporation. MIT

namespace Microsoft.SubscriptionBilling;using Microsoft.Inventory.Item;using Microsoft.Inventory.Item.Catalog;tableextension 8009 "Usage Based Item Vendor" extends "Item Vendor"{    fields    {        field(8000; "Supplier Ref. Entry No."; Integer)        {            Caption = 'Usage Data Supplier Ref. Entry No.';            DataClassification = CustomerContent;            TableRelation = "Usage Data Supplier Reference" where(Type = const(Product));            trigger OnValidate()            var                Item: Record Item;            begin                if Rec."Item No." = '' then                    exit;                Item.Get(Rec."Item No.");                if Item."Subscription Option" <> Enum::"Item Service Commitment Type"::"Service Commitment Item" then                    Error(NotServiceCommitmentItemErr);            end;        }    }    var        NotServiceCommitmentItemErr: Label 'Usage Data Supplier Ref. Entry No. can only be entered for Subscription Items (see "Subscription Option in the Item).';}