Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

add new fields or columns

(0) ShareShare
ReportReport
Posted on by 15

Good afternoon community, I would like to ask: if I wanted to add a new column to the products table, could I do it? One in which I define its use.
Yes, it is so, how?

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,036 Super User 2024 Season 2 on at
    RE: add new fields or columns

    Hi, Hope the link below can give you some hints/

    https://yzhums.com/21735/

    Thanks.

    ZHU

  • developerCc Profile Picture
    developerCc 15 on at
    RE: add new fields or columns

    Hello, good afternoon, as recommended, I started to get into development with AL, but when I wanted to execute a very simple code (docs.microsoft.com/.../introduction-development-process /5-exercise)

    I get this error: "Could not download symbols. Please see the Visual Studio Code output log for more details."

    I was also reading that the changes you make will be done in the sandbox not in the production environment.

    Could you explain to me how to start developing with AL and that these changes are seen in the production environment, please.

    First of all, Thanks.

  • Janarthananv Profile Picture
    Janarthananv 87 on at
    RE: add new fields or columns

    Dear @DeveloperCc,

    Please try with the following code for adding a new field in Business Central.

    tableextension 50100 "My new item feild" extends Item

    {

       fields

       {

           field(50101; "dropboxtest"; Decimal)

           {

               Caption = 'Drop Box Value';

               DataClassification = ToBeClassified;

           }

           field(50102; Newfield; Integer)

           {

               Caption = 'Input';

               DataClassification = CustomerContent;

           }

           field(50103; "Test"; Option)

           {

               Caption = 'Value Option';

               DataClassification = ToBeClassified;

               OptionMembers = "Value1","Value2";

           }

           field(50104; Instructorcode; Code[25])

           {

               Caption = 'Instructor  File';

               DataClassification = ToBeClassified;

               TableRelation = Resource where(Type = const(Person));

           }

           field(50105; DateOfBirth; Date)

           {

               Caption = 'Date Of Birth';

               DataClassification = ToBeClassified;

           }

       }

    }

    pageextension 50100 "Field on item card" extends "Item Card"

    {

       layout

       {

           addfirst(InventoryGrp)

           {

               field(dropboxtest; Rec."dropboxtest")

               {

                   ApplicationArea = all;

               }

           }

           addfirst(InventoryGrp)

           {

               field(Newfield; Rec.Newfield)

               {

                   ApplicationArea = all;

                   Importance = Additional;

               }

           }

           addfirst(InventoryGrp)

           {

               field(Test; Rec.Test)

               {

                   ApplicationArea = all;

                   ShowMandatory = true;

               }

           }

           addfirst(InventoryGrp)

           {

               field(Instructorcode; Rec.InstructorCode)

               {

                   ApplicationArea = all;

               }

           }

           addlast(InventoryGrp)

           {

               field(DateOfBirth; Rec.DateOfBirth)

               {

                   ApplicationArea = all;

               }

           }

       }

       actions

       {

       }

    }

    Thanks,

    Janarthanan.v

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: add new fields or columns

    Hi,

    Yes by using of Visual Studio code with AL language development you can do that, please follow the links as Zhu mentioned.

    Thanks.

  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 74,036 Super User 2024 Season 2 on at
  • Suggested answer
    MahGah Profile Picture
    MahGah 15,428 on at
    RE: add new fields or columns

    Hi

    Please see this article  www.cloudfronts.com/.../

    Or you can see Simple Object Designer   www.hougaard.com/.../

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans