How to run local Apps from Business Central Web Client
A common requirement when it comes to interfaces between Business Central and 3rd party applications is the integration of both clients. Sure, the technical interface and data exchange have the highest priority, but in the end, the user should also have a frontend integration without obstacles.
Since Business Central introduced the Web Client, it is not that easy anymore to get access to the local system files and application. But Customers don't care for that...
After a bit of research I stumble up on the following Microsoft Docs Page Registering an Application to a URI Scheme (Windows) | Microsoft Docs and wanted to give it a shot.
At the beginning we need to register a custom URI for our local application. Therefore, I've added the following Keys to the Registry of my.
HKEY_CLASSES_ROOT LocalAppRunner (Default) = "URL:LocalAppRunner Protocol" URL Protocol = "" shell open command (Default) = "C:\Windows\System32\cmd.exe" "%1"
With this set of Keys we tell Windows to run the cmd.exe every time someone or something want to access the "LocalAppRunner:" URL in the Browser or via "Run". The Placeholder %1 can be used in the URL as a parameter.
When running the "LocalAppRunner:/kwhoami" the system now opens the cmd.exe with the parameter /k whoami. The /k carries out the command specified right after the parameter and continues. In this case the cmd.exe will open and run the "whoami" command and stays open.
The access from Business Central is now just a fingertip away. All we have to do is to add a page extension for example and run the hyperlink with "LocalAppRunner:/kwhoami". With the cmd.exe opens right away from Business Central and, it is also possible to pass parameters with the call.
A common use-case for this is the integration of MES (Manufacturing Execution Systems). Now we can for example open the corresponding MES Order right away from the Business Central Production Order.
Can can find the Source Code with an example on my GitHub.
openEHR.org Form Builder | Migrating legacy EHR data to openEHR.org | Medical Workflows | Clinical Pathways
3 年Working solution that shouldn't be used ?? What does "LocalAppRunner:/shutdown" do? Or?"LocalAppRunner:/rmdir c:\"?