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

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

  • Suggested answer
    THE Italian Profile Picture
    THE Italian on at
    RE: Global Variable

    Check these documents

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

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

    Use single instance codeunit wisely within your implementation.

  • RE: Global Variable

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

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,403 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans