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...
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!
 
I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    60,993 Super User 2025 Season 2 on at
    Please use Rec.No
     
    field(No; Rec.No)
  • Suggested answer
    Saurav.Dhyani Profile Picture
    14,380 Super User 2025 Season 2 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
    25,213 Most Valuable Professional on at
  • Suggested answer
    Govinda Kumar Profile Picture
    2,304 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

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,143

#2
Jainam M. Kothari Profile Picture

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

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans