Page 9997 Word Templates Tables Part in 25

App
System Application
Namespace
System.Integration.Word
Source table
9987

Versions171819202122232425262728latest

Source242526272829

Source in 25

src/System Application/App/Word Templates/src/WordTemplatesTablesPart.Page.al68 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 System.Integration.Word;

/// <summary>
/// A list part page to view, add and remove tables for Word templates.
/// </summary>
page 9997 "Word Templates Tables Part"
{
    Caption = 'Word Template Tables';
    PageType = ListPart;
    SourceTable = "Word Templates Table";
    InsertAllowed = false;
    ModifyAllowed = false;
    DeleteAllowed = true;
    Extensible = false;
    Permissions = tabledata "Word Templates Table" = rmd;
    InherentEntitlements = X;
    InherentPermissions = X;

    layout
    {
        area(Content)
        {
            repeater(Tables)
            {
                Editable = false;
                field(Name; Rec."Table Caption")
                {
                    ApplicationArea = All;
                    Caption = 'Name';
                    ToolTip = 'Specifies the name of the data source from which the template will get data.';
                    Editable = false;
                }
            }
        }
    }

    actions
    {
        area(Processing)
        {

            action("Add new entity")
            {
                ApplicationArea = All;
                Caption = 'Add new entity';
                ToolTip = 'Select and add a source table to the template.';
                Image = New;

                trigger OnAction()
                var
                    WordTemplateImpl: Codeunit "Word Template Impl.";
                    TableId: Integer;
                begin
                    TableId := WordTemplateImpl.AddTable();
                    if TableId <> 0 then begin
                        Rec.Get(TableId);
                        CurrPage.Update(false);
                    end;
                end;
            }
        }
    }
}