Announcements
Hi all,
I want to insert a custom field in a report. I followed below mentioned link to create field:
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)".
Can anyone help me with this?
Thanks in Advance
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
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
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) { } } } }
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
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.
Thanks in Advance,
Vani Vashisht
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
André Arnaud de Cal...
294,208
Super User 2025 Season 1
Martin Dráb
232,970
Most Valuable Professional
nmaenpaa
101,158
Moderator