web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Verified answer
    YUN ZHU Profile Picture
    95,548 Super User 2025 Season 2 on at

    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

  • Community Member Profile Picture
    on at

    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

  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,284 Super User 2025 Season 2 on at

    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.

  • Suggested answer
    YUN ZHU Profile Picture
    95,548 Super User 2025 Season 2 on at

    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

  • Community Member Profile Picture
    on at

    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.

  • Verified answer
    YUN ZHU Profile Picture
    95,548 Super User 2025 Season 2 on at

    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

    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,

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,151

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,443 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,092 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans