Create the activation code information table object

Completed

The Activation Code Information table is used for storing activation information for the extension. In this table, you'll store when the extension was activated and when it expires. The table consists of three fields:

  • ActivationCode

  • Date Activated

  • Expiration Date

Note

Later in this module there is an exercise where you can create this object, following step by step instructions.

As previously explained, you can create a new file with the name ActivationCodeInformation.Table.al. Paste the following code in the file to create the table definition.

table 50101 "Activation Code Information"
{
    Caption = 'Activation Code Information';
    DataClassification = SystemMetadata;
    fields
    {
        field(1; ActivationCode; Text[14])
        {
            Caption = 'Activation Code';
            DataClassification = SystemMetadata;
            Description = 'Activation code used to activate Customer Rewards';
        }

        field(2; "Date Activated"; Date)
        {
            Caption = 'Date Activated';
            DataClassification = SystemMetadata;
            Description = 'Date Customer Rewards was activated';
        }

        field(3; "Expiration Date"; Date)
        {
            Caption = 'Expiration Date';
            DataClassification = SystemMetadata;
            Description = 'Date Customer Rewards activation expires';
        }
    }

    keys
    {
        key(PK; ActivationCode)
        {
            Clustered = true;
        }
    }
}

Make sure that you save the object by using the Ctrl+S shortcut keys.

In this table, notice that the Description property has been set for the fields. The Description property holds the description of the table, field, page, report, or control. This description is for internal use only and doesn't appear to end users.