How to View the Table Designer from Business Central Modern Client

SaranBusiness Central5 years ago18 Views

Table Designer in Business Central Modern Client

It’s Christmas time and let’s celebrate the holiday season with some tips on Business Central!!

Hereafter, we no longer have Object Designer and we need to use the much powerful VS Code replacing Development Environment. Although, we have VS Code, I miss some of the following from Object Designer as follows:

  • Getting the exact table name based on Table ID or vice versa
  • Knowing the Datatype and Length of the field
  • Option string of the field
  • Table Relation of the field

In order to access these features from Business Central Modern Client, we are going to go through the following approach (Of course, we can use Page Inspection to certain extent based on the previous blog).

Steps:

  • Let’s create a page called ‘Table Designer List’ using VS Code. The page is created out of a Virtual table ‘Field’. Please find the code as follows.
page 50112 "Table Designer List"
{
    PageType = list;
    ApplicationArea = All;
    UsageCategory = Lists;
    SourceTable = Field;
    layout
    {
        area(Content)
        {
            group(General)
            {
                field("Table ID"; "Table ID")
                {
                    ApplicationArea = All;
                    Lookup = true;
                    TableRelation = "Table Metadata".ID;
                }
            }
            repeater(GroupName)
            {
                field(TableNo; TableNo)
                {
                    ApplicationArea = All;
                    Editable = false;
                }
                field("No."; "No.")
                {
                    ApplicationArea = all;
                    Editable = false;
                }
                field(TableName; TableName)
                {
                    ApplicationArea = all;
                    Editable = false;
                }
                field(FieldName; FieldName)
                {
                    ApplicationArea = all;
                    Editable = false;
                }
                field("Type Name"; "Type Name")
                {
                    ApplicationArea = all;
                    Editable = false;
                }
                field(Len; Len)
                {
                    ApplicationArea = all;
                    Editable = false;
                }
                field(OptionString; OptionString)
                {
                    ApplicationArea = all;
                    Editable = false;
                }
                field(RelationTableNo; RelationTableNo)
                {
                    ApplicationArea = all;
                    Editable = false;
                }
                field(RelationFieldNo; RelationFieldNo)
                {
                    ApplicationArea = all;
                    Editable = false;
                }
            }
        }
        area(Factboxes)
        {
        }
    }
    actions
    {
        area(Processing)
        {
            action(ActionName)
            {
                ApplicationArea = All;
                Caption = 'Show Table Details';
                Image = ShowSelected;
                Promoted = true;
                PromotedCategory = Process;
                trigger OnAction();
                begin
                    SetRange(TableNo, "Table ID");
                end;
            }
        }
    }
    var
        "Table ID": Integer;
}
  • Build and Publish the Extension
  • Navigate to the page ‘Table Designer List’.

As you can see, the Table Designer list page has a Table ID to be entered and then click on Show Table Details from the ribbon. Once Table ID is entered, we are able to get the details such as Table Name, Field Name, Type, Length, Option String Details, Table Relation of the field from the Modern Client itself.

Have fun with Business Central!!

Original Post https://codethecoffee.wordpress.com/2019/12/24/how-to-view-the-table-designer-from-business-central-modern-client/

0 Votes: 0 Upvotes, 0 Downvotes (0 Points)

Leave a reply

Join Us
  • X Network2.1K
  • LinkedIn3.8k
  • Bluesky0.5K
Support The Site
Events
March 2025
MTWTFSS
      1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31       
« Feb   Apr »
Follow
Sign In/Sign Up Sidebar Search
Popular Now
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...