0

Let's assume we have an app which runs in browser (in my case it is web client for Dynamics Nav) and a hardware that is installed on user's local machine (cache register in my case).

What would be the way to access local hardware from browser (even regardless of Nav)? All kind of tricks are acceptable. I just want to know what options do I have.

Mak Sim
  • 2,148
  • 19
  • 30

1 Answers1

2

You could write an application or library that communicates with the hardware and runs on the local machine. Your app inside the browser then sends requests to this application or library via web service or interprocess communication.

As a concrete example: Use C# to create a library that communicates with your hardware. Additionally create an application, that hosts a WCF service. This WCF service references the library, so it can directly communicate with hardware.

Now create a JavaScript Control Add-In that sends requests via XMLHttpRequest to the WCF service. Finally create a new page in Dynamics NAV and add the JavaScript Control Add-In to it. Within this page you can call functions of the Add-In which will send requests to your running WCF service which will interact with the hardware.

Denuath
  • 130
  • 1
  • 6