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

Accessing Codeunit Global Variable in Page Extensions

(1) ShareShare
ReportReport
Posted on by 29
Can I access my CodeUnit’s Global Variable from a page extension? I’m getting AL0161 from the compiler and Microsoft’s Documentation is completely silent on what the actual behavior should be and lacking overall. Thanks in advance.  


CodeUnit
 
Local Procedure from PageExtension utilizing the CodeUnit global variable directly
 
Errors everywhere. 
I have the same question (0)
  • Suggested answer
    Gerardo Rentería García Profile Picture
    25,390 Most Valuable Professional on at
  • Verified answer
    YUN ZHU Profile Picture
    95,763 Super User 2025 Season 2 on at
    As far as I know, it cannot be done.
    PS: Dynamics 365 Business Central: Can we access global variables from page extensions or table extensions? Yes, But……
     
    Thanks.
    ZHU

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 2,116

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 764 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 635 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans