Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Business Central forum

Node js script in AL Extension

(0) ShareShare
ReportReport
Posted on by 415

Hello everyone,

How should i run Node js Script in AL Extension.

Thanks

Categories:
  • Verified answer
    CanuckNav74 Profile Picture
    on at
    RE: Node js script in AL Extension

    You can't.

    Cloud version has no filesystem access, nor dotnet access. You cannot use the File virtual table from a cloud AL extension either.

    The only way to satisfy your use case is through http rest calls from nav

    Look around on GitHub. There are solutions (node especially) out there that can expose a remote filesystem to list/create/update/get/delete files via http rest.

    Its not ideal but thats one of the limitations of BC cloud.

  • Manish Ratan Profile Picture
    415 on at
    RE: Node js script in AL Extension

    Thanks for reply.

    I am trying to create directory in D365BC(Cloud Version) through control add-in using node js.

    How can i achieve this in D365BC(Cloud Version) .

    Thanks.

  • CanuckNav74 Profile Picture
    on at
    RE: Node js script in AL Extension

    For OnCloud (hosted), can't.

    Best you can do to leverage your node.js assets from Business Central is to host your node app on azure or as on-prem always-running app (docker/linux/windows/whatever). So long as the node app exposes am http REST interface (e.g. express.js), your extension can call it via NAV's native HttpClient, XmlDocument, and JsonObject datatypes that are available to both C/AL and AL. 

    For OnPrem, technically it's possible to call a node.js script directly via dotnet interop (e.g. System.Diagnostic.Process to launch a process). keep in mind that if you take this direction, your extention will never work in BC OnCloud. Microsoft has made it very clear that .net interop will be for on-prem AL extensions only.  

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central forum

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans