Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Custom field in existing form

(0) ShareShare
ReportReport
Posted on by

Hello Experts,

I have created an extension for adding a new filed into existing page "Company Information", The extension has been published from VS code and it is showing as "installed" in the extension management screen. But unable to see the new field in Company Information page. It would be great help for me if anybody can guide me on this. See the below screen shot's for vs code.

5810.MicrosoftTeams_2D00_image-_2800_1_2900_.png

MicrosoftTeams_2D00_image-_2800_2_2900_.png

MicrosoftTeams_2D00_image-_2800_3_2900_.png

  • Community Member Profile Picture
    on at
    RE: Custom field in existing form

    Hi YUN ZHU,

    Thank you for your help to solve this issue. We could to create the report with custom new field value.

    Now facing other issue same as above, there is a field GST Registration No.  in Company Information Page and this is not listing for xml mapping. The mentioned field is default one in Company Information page for BC IN Localization.

    We tried with all the ways discussed previously but still issue is there.

    Thank you very much for your time.

    Reagrds,

  • Verified answer
    YUN ZHU Profile Picture
    85,674 Super User 2025 Season 1 on at
    RE: Custom field in existing form

    Hi, you added the new field to "Company Information" table, but you are trying to get fields from "Sales Invoice Header" table. This obviously can't find your new fields.

    pastedimage1647326863128v1.png

    There are several ways to deal with this, the following is just one of them, I hope it can help you.

    pastedimage1647327921085v6.png

    pastedimage1647327545771v2.png

    pastedimage1647327681848v4.png

    pastedimage1647327876677v5.png

    Source code:

    tableextension 50100 MyExtension extends "Company Information"
    {
        fields
        {
            field(50101; "CIN Number"; Code[20])
            {
                DataClassification = CustomerContent;
                Caption = 'CIN Number';
            }
        }
    }
    
    pageextension 50100 MyExtension extends "Company Information"
    {
        layout
        {
            addafter(Name)
            {
                field("CIN Number"; Rec."CIN Number")
                {
                    ApplicationArea = All;
                }
            }
        }
    }
    
    reportextension 50100 MyExtension extends "Standard Sales - Invoice"
    {
        dataset
        {
            add(Header)
            {
                column(CINNumber; CompanyInfo2."CIN Number")
                { }
            }
        }
        var
            CompanyInfo2: Record "Company Information";
    
        trigger OnPreReport()
        begin
            CompanyInfo2.Get();
        end;
    }

    Layout file: [View:/cfs-file/__key/communityserver-discussions-components-files/758/Default-_2800_8_2900_.docx

  • Community Member Profile Picture
    on at
    RE: Custom field in existing form

    Hi Teddy/ZHU,

    As mentioned tried to insert new field into report data set, but getting an error as "The name CIN Number does not exist in the current context AL(AL0118)"

    3542.MicrosoftTeams_2D00_image-_2800_4_2900_.png

    Thank you for your advise on this.

  • Suggested answer
    YUN ZHU Profile Picture
    85,674 Super User 2025 Season 1 on at
    RE: Custom field in existing form

    Hi, as Teddy mentioned, you need to add your dataitem to standard report.

    This is a simple example, hope this will help.

    https://yzhums.com/10723/

    Thanks.

    ZHU

  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    13,752 Moderator on at
    RE: Custom field in existing form

    You need to add the new field into the report dataset.

    If this is a standard report, you can do report extension and add that field in the dataset.

  • Community Member Profile Picture
    on at
    RE: Custom field in existing form

    Hi ZHU,

    I did the page extension as mentioned and it is working fine. But now there is a problem facing is that the new field "CIN Number" could not map with the custom report layout(word Layout).  Is there any settings to map custom fields into report layouts?

    Thanks,

    Ranjith

  • Verified answer
    YUN ZHU Profile Picture
    85,674 Super User 2025 Season 1 on at
    RE: Custom field in existing form

    Hi, In addition to TableExtension, you also need PageExtension to display this field.

    For example,

    pastedimage1646800212878v1.png

    pastedimage1646800257189v2.png

    Hope this will help.

    Thanks.

    ZHU

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans