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

Global Variable

(0) ShareShare
ReportReport
Posted on by 115

Hi Guys,

I want to know how long a global variable holds its value ?
In my case I have a global variable in codeunit A and setting its value through codeunit B and after that I have called page.run(51000) function which is a wizard but when I try to access the global variable in step 1 of wizard through get function it returns null. Can anyone guide?
Thanks

I have the same question (0)
  • Community Member Profile Picture
    on at

    You can set Single Instance = true in Codeunit A so you can access the global variable in codeunit A from other object

  • Suggested answer
    THE Italian Profile Picture
    Microsoft Employee on at

    Check these documents

    docs.microsoft.com/.../understanding-codeunits

    docs.microsoft.com/.../devenv-singleinstance-property

    Use single instance codeunit wisely within your implementation.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,138 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,279 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,192

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans