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

Declare .Net Variable

(0) ShareShare
ReportReport
Posted on by 60

Hi, 

Im new at BC.

I want to know how to declare a dot net variable into a report.

thanks

I have the same question (0)
  • Suggested answer
    Vaishnavi J Profile Picture
    3,062 on at

    Hi,

    A DotNet variable cannot be used in a SaaS environment. You must encapsulate your.NET code within an Azure Function and call it from AL using the HttpClient object.

    If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    And even if you are in BC on prem you should implement it the way that Vaishnavi J suggested. So that you are ready to move to the cloud when you find out that the cloud is the best option for you.

  • Suggested answer
    YUN ZHU Profile Picture
    95,739 Super User 2025 Season 2 on at

    Hi, just adding some info for BC On-Premises

    You can still use .NET Interoperability in On-Premises.

    More details:

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-get-started-call-dotnet-from-al

    pastedimage1663808746751v1.png

    pastedimage1663808797318v2.png

    And note:

    .NET add-ins not using .NET Standard (Removal)

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/upgrade/deprecated-features-platform#net-add-ins-not-using-net-standard-removal

    pastedimage1663808831570v3.png

    Hope this helps.

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

#2
YUN ZHU Profile Picture

YUN ZHU 733 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 612

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans