web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

The name of a field does not exist in the current context in AL Page Definition for Dynamics 365 BC

(1) ShareShare
ReportReport
Posted on by 30

Hello,

I am a beginner and have just started using Dynamics 365 BC and the AL programming language. I have a local version installed on my PC, which I believe is called On-Premises. I access the main page by entering localhost:8080/BC2030 in my browser.

I also have LS Central installed but am not sure how it relates to BC and the overall setup on my system. I thought it might be useful to provide some context about my setup as it might be the reason for the issues I am experiencing.

I am following the development of an extension from the book "Dynamics 365 Business Central Development Quick Start Guide." After setting up the tables for the extension, which you can see HERE and HERE, the authors proceed to create the related list pages to display the categories and gifts as lists. The list page for the categories is HERE.

However, when I try to use field(No; No)..., field(Description; Description)... in VS Code, it produces the error "The name 'No' does not exist in the current context".

,
even though you can see that the Source Table is recognized.
Any suggestions why this is case and how I could try to solve it. Thanks!
 
  • Suggested answer
    Mohana Yadav Profile Picture
    61,260 Super User 2026 Season 2 on at
    Please use Rec.No
     
    field(No; Rec.No)
  • Suggested answer
    Saurav.Dhyani Profile Picture
    14,481 User Group Leader on at
    Hi,
     
    Business Central currently does not support implicit Rec. 
     
    You will have to specify explicit Rec in the source expression.
     
    To add a field in page Syntax is - Field (Name, Expression)
     
    Rules are - 
    1. Name should be unique in the page.
    2. Expression can be a formula or a field from source table.
    3. If it's a field from source table then specify Rec.FieldName.
     
    Hope it helps.
     
    Regards,
    Saurav Dhyani
  • Gerardo Rentería García Profile Picture
    27,623 Super User 2026 Season 2 on at
  • Suggested answer
    Govinda Kumar Profile Picture
    2,310 Moderator on at
    Hi,
     
    In Business Central, you cannot write expressions without using the implicit Rec. The correct way to write expressions is by explicitly using Rec.
     
    page 50100 "Customer Category List"
    {
        PageType = List;
        SourceTable = "Customer Category";
        UsageCategory = Lists; // To be inserted in D365BC Search
        ApplicationArea = All;
    
        Caption = 'Customer Category List';
    
        layout
        {
            area(content)
            {
                repeater(Group)
                {
                    field(No; Rec.No)
                    {
                        ApplicationArea = All;
                    }
                    field(Description; Rec.Description)
                    {
                        ApplicationArea = All;
                    }
                }
            }
        }
    }
    
     
    You can find more information here.

    Best regards,
    Govinda Kumar

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 664 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 446 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 282 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans