As per title, I'm trying to call some C/AL function from .NET - is this possible at all? I'm using NAV2017.
Asked
Active
Viewed 1,160 times
1
-
You could set up SOAP webservices in your service tier and call your function through SOAP. – Raaen Jan 23 '17 at 07:08
2 Answers
5
You'd be best calling a Codeunit exposed over Dynamics NAV Web Services which in turn, will trigger C/AL code.
A simple example (that UPPERCASES a string) for NAV 2017 can be found on MSDN;

Jake Edwards
- 1,190
- 11
- 24
-
1You can also use PowerShell cmdlet Invoke-NAVCodeunit to run codeunit directly, without web services - https://msdn.microsoft.com/en-us/dynamics-nav/microsoft.dynamics.nav.management/invoke-navcodeunit – sergeyol Jan 20 '17 at 09:47
-
1
If your Code will be running on the NAV Server you can add the Microsoft.Dynamics.Nav.Management.dll as Reference to your Visual Studio Project. In this case you have to deploy your App to the Service Directory (C:\Program Files\Microsoft Dynamics NAV\*\Service).

chrisblankde
- 70
- 6