Hello everyone,
How should i run Node js Script in AL Extension.
Thanks
Hello everyone,
How should i run Node js Script in AL Extension.
Thanks
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.
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.
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.