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...
Unanswered

Integrating Dotnet and business central

(0) ShareShare
ReportReport
Posted on by 980

Hi All,

Trying to implement field level security in business central I need th following variables from dotnet:

        NavDesignerProperty: DotNet DesignerFieldProperty. ;
        NavDesignerFieldType: DotNet DesignerFieldType;
        NavDesigner: DotNet NavDesignerALFunctions;
      
I get an error in VSCODE that these variables are missing .
Any idea how this could be achieved?
 
Regards,
Indira
I have the same question (0)
  • Lars Lohndorf-Larsen Profile Picture
    on at

    Hi Indira,

    I hope that this can help you:

    1)

    DesignerFieldProperty is included in "Microsoft.Dynamics.Nav.Ncl":

    github.com/.../dotnet.al

    2)

    Microsoft.Dynamics.Nav.Ncl.dll is in the BC Server folder (C:\Program Files\Microsoft Dynamics 365 Business Central\1x0\Service)

    3)

    By default, the compiler only knows about the location of the mscorlib assembly: docs.microsoft.com/.../devenv-get-started-call-dotnet-from-al

    So you need to unclude the dll into the project, you can do that in Settings.json by adding the path to the BC Server folder to include all the dlls in that location:

    {
    "al.assemblyProbingPaths": [
    "C:/Program Files/Microsoft Dynamics 365 Business Central/160/Service"
    ]
    }

    as shown here:

    pastedimage1616076560662v1.png

    After that, your reference to this assembly should compile.

  • Indira88 Profile Picture
    980 on at

    Hi Lars Lohndorf-Larsen,

    In a project  that is created for extension development it does not have a settings.json.

    I created one though added the code for the assemblyPaths however it does not compile still.

    It is a cloud application not an On prem.

    Is there anything that I am missing.

    Regards,

    Indira

  • Lars Lohndorf-Larsen Profile Picture
    on at

    Hi Indira,

    I think you may have hit this limitation?

    community.dynamics.com/.../using-dotnet-variables-in-business-central

    "You cannot use a DotNet variable on a SaaS environment. You need to wrap your .NET code inside an Azure Function and call this function from AL using the HttpClient object."

    The problem with Dotnet variables is that they can link up to anything or any parts of the OS, so running this in cloud (= on somebody elses server) is limited.

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

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans