26. Mai 2024 11:32
enum 50108 EnumTest
{
    Extensible = true;
    Caption = 'EnumTest';
    
    value(1; Rosso)
    {
        Caption = 'Rosso';
    }
    value(2; Blu)
    {
        Caption = 'Blu';
    }
    value(3; Verde)
    {
        Caption = 'Verde';
    }
}
enumextension 50108 EnumTestExtension extends EnumTest
{
    value(50108; Giallo)
    {
        Caption = 'Giallo';
    }
    
}
codeunit 50108 EnumCodeunit
{
    procedure SelectColor()
    var
        MyFavoColor: Enum "EnumTest";
    begin
        MyFavoColor := EnumTest::Giallo;
        case MyFavoColor of
            EnumTest::Rosso:
                Message('Rosso');
            EnumTest::Blu:
                Message('Blu');
            EnumTest::Verde:
                Message('Verde');
            EnumTest::Giallo:
                Message('Giallo');
        end;
    end;
}
table 50108 EnumTable
{
    DataClassification = ToBeClassified;
    Caption = 'EnumTable';
    
    fields
    {
        field(1;ID; Code[20])
        {
            DataClassification = ToBeClassified;
            Caption = 'ColorID';
        }
        field(2;Color; Enum EnumTest)
        {
            DataClassification = ToBeClassified;
            Caption = 'Color';
        }
        
    }
    
    keys
    {
        key(PKey; ID)
        {
            Clustered = true;
        }
    }
    
       
}
page 50108 EnumPage
{
    PageType = Card;
    ApplicationArea = All;
    UsageCategory = Documents;
    SourceTable = EnumTable;
    
    layout
    {
        area(Content)
        {
            group(GroupName)
            {
                field(Color;Color)
                {
                    ApplicationArea = All;
                    Caption   = 'Color';
                    ToolTip = 'Select a Color';
                    
                    
                }
            }
        }
    }
}
27. Mai 2024 08:00
page 50108 EnumPage
{
    PageType = Card;
    ApplicationArea = All;
    UsageCategory = Documents;
    SourceTable = EnumTable;
    layout
    {
        area(Content)
        {
            group(GroupName)
            {
                field(ID; Rec.ID)
                {
                    ApplicationArea = All;
                    Caption = 'ID';
                }
                field(Color; Rec.Color)
                {
                    ApplicationArea = All;
                    Caption = 'Color';
                    ToolTip = 'Select a Color';
                }
            }
        }
    }
}28. Mai 2024 17:49