Skip to main content

Notifications

Community site session details

Community site session details

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

How can I insert a custom field in Business Central

(1) ShareShare
ReportReport
Posted on by 2,047

Hi all, 

I want to insert a custom field in a report. I followed below mentioned link to create field:

https://www.archerpoint.com/blog/Posts/adding-field-extension-microsoft-dynamics-business-central-or-nav

I create a table extension and created a new custom field named as Notes of text datatype for Sales Invoice.  and then I created a page extension and placed custom field in that page. 

Published the application on Business Central. Downloaded the symbols again. then tried to create a report.al file for the RDL file creation. 

When I created report.al file to place the fields in the business central it is showing me an error "The name 'Notes' does not exist in the current contextAL(AL0118)". 

pastedimage1605968082841v1.png

Can anyone help me with this? 

Thanks in Advance

  • Suggested answer
    Anks27 Profile Picture
    1,083 on at
    RE: How can I insert a custom field in Business Central

    Hello,

    I have gone through your question as well as link, one of the possibility of the issue is your custom field extension is different than current extension. so what you need to do is add dependency of your that custom field extension into app.json file or if the extension are not different then try to ReOpen VS Code and after that you can check your field is usable or not.

    Don't forget to help the community by verifying the answer if your question has been answered. It will let others know that the topic has verified answer.

     

    Thanks & Regards,

    Ankit Shah

  • Suggested answer
    darcnus Profile Picture
    235 on at
    RE: How can I insert a custom field in Business Central

    Sometimes the symbols need to be rebuilt after changes. You can rebuild with or without data by adding 'schemaUpdate' to your launch.JSON file:

    docs.microsoft.com/.../devenv-retaining-data-after-publishing

  • Suggested answer
    Bilal Haider Profile Picture
    248 on at
    RE: How can I insert a custom field in Business Central

    In the code below I have added a new field and then took that field to report and it is working 100% correct. Please check it and see if you have done something different than this.

    tableextension 50100 MyExtension extends "Sales Invoice Header"
    {
        fields
        {
            field(50100; Notes; Text[250])
            {
                DataClassification = ToBeClassified;
            }
        }
    
        var
            myInt: Integer;
    }
    
    report 50100 MyReport
    {
        UsageCategory = Administration;
        ApplicationArea = All;
    
        dataset
        {
            dataitem(DataItemName; "Sales Invoice Header")
            {
                column(Notes; Notes)
                {
    
                }
            }
        }
    }

  • Bilal Haider Profile Picture
    248 on at
    RE: How can I insert a custom field in Business Central

    Please share the screenshot of table no/name where you have added the notes field and also share the dataitem of that table under which you are adding this notes field.

    Regards,

    Bilal

  • Inkey Solutions Profile Picture
    2,047 on at
    RE: How can I insert a custom field in Business Central

    Hi Bilal,

    Thanks for your response. We have inserted the field in the correct table and using the same in reports. Kindly look into the image provided below. 

     5432.ss.png

    Thanks in Advance, 

    Vani Vashisht 

  • Suggested answer
    Bilal Haider Profile Picture
    248 on at
    RE: How can I insert a custom field in Business Central

    Hi,

    For which table you are creating the report we cannot see it as the image you attached is very small.

    Verify that you have added the field in correct table. And you are using the same table in report.

    Regards,

    Bilal Rai

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,208 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,970 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans