Table 3303 Payables Agent Setup

Payables Agent, Microsoft.Agent.PayablesAgent

src/Apps/W1/PayablesAgent/app/Setup/PayablesAgentSetup.Table.al129 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.// ------------------------------------------------------------------------------------------------#pragma warning disable AS0007namespace Microsoft.Agent.PayablesAgent;using Microsoft.eServices.EDocument;using System.Agents;table 3303 "Payables Agent Setup"{    Access = Internal;    Extensible = false;    ReplicateData = false;    InherentEntitlements = RIMDX;    InherentPermissions = rimdX;    Permissions = tabledata "Payables Agent Setup" = ri;    fields    {        field(1; Id; Integer)        {            DataClassification = SystemMetadata;        }        field(2; "E-Document Service Code"; Code[20])        {            DataClassification = CustomerContent;            TableRelation = "E-Document Service".Code;        }        field(3; "Monitor Outlook"; Boolean)        {            DataClassification = SystemMetadata;        }#if not CLEANSCHEMA28#pragma warning disable AS0072        field(4; "Agent User Security Id"; Guid)        {            DataClassification = SystemMetadata;            ObsoleteReason = 'No longer used, replaced by "User Security Id" field';#if not CLEAN28            ObsoleteState = Pending;            ObsoleteTag = '28.0';#else            ObsoleteState = Removed;            ObsoleteTag = '31.0';#endif        }#pragma warning restore AS0072#endif        field(5; "Review Incoming Invoice"; Boolean)        {            DataClassification = CustomerContent;            InitValue = true;        }        field(7; Exists; Boolean)        {            Caption = 'Exists';            FieldClass = FlowField;            CalcFormula = exist(Agent where("User Security ID" = field("User Security Id")));        }        field(9; "Last Activated"; DateTime)        {            Caption = 'Last Activated';            DataClassification = SystemMetadata;        }        field(10; "User Security Id"; Guid)        {            DataClassification = SystemMetadata;        }#if not CLEANSCHEMA32#pragma warning disable AS0072        field(11; "Use MLLM Processing"; Boolean)        {            Caption = 'Use MLLM Processing';            DataClassification = SystemMetadata;            ObsoleteReason = 'The MLLM Payables Agent feature is fully rolled out; the toggle used to roll it out is no longer needed.';#if not CLEAN29            ObsoleteState = Pending;            ObsoleteTag = '29.0';#else            ObsoleteState = Removed;            ObsoleteTag = '32.0';#endif        }#pragma warning restore AS0072#endif        field(12; "Email Review Policy"; Enum "PA Email Review Policy")        {            Caption = 'Email review';            DataClassification = CustomerContent;        }        field(13; "Applied Instr. Config Hash"; Text[64])        {            Caption = 'Applied Instructions Configuration Hash';            DataClassification = SystemMetadata;        }    }    keys    {        key(PK; Id)        {            Clustered = true;        }    }    internal procedure GetSetup()    begin        if GetSetup(true) then;    end;    /// <summary>    /// Gets the setup and optionally creates it if missing    /// </summary>    /// <param name="InsertIfMissing">Whether to insert the setup record if it is missing</param>    /// <returns>True if the setup record exists or was created, false otherwise</returns>    internal procedure GetSetup(InsertIfMissing: Boolean): Boolean    begin        if Rec.FindFirst() then            exit(true);        Clear(Rec);        if InsertIfMissing then begin            Rec.Insert();            exit(true);        end;        exit(false);    end;}