Skip to main content

Notifications

Business Central forum
Answered

add new fields or columns

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?

Categories:
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 69,510 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,023 Moderator 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 69,510 Super User 2024 Season 2 on at
  • Suggested answer
    MahGah Profile Picture
    MahGah 15,419 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

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,522 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,441 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans