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

  • Suggested answer
    YUN ZHU Profile Picture
    85,883 Super User 2025 Season 1 on at
    RE: Declare .Net Variable

    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

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,029 Moderator on at
    RE: Declare .Net Variable

    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
    Vaishnavi J Profile Picture
    3,060 on at
    RE: Declare .Net Variable

    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.

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans