Integrate Microsoft Dynamics NAV with third party app - microsoft-dynamics

I built web app by golang, and I want integrate it with Microsoft Dynamics NAV, and I don't know from where can start,
Is there a way to integrate Microsoft Dynamics NAV by REST API, or any other methods?

Depending on the version of NAV we're talking about, a number of its object types (not really OO; think ~modules) can be published as SOAP or OData webservices. For reading and writing NAV data, I would probably recommend a page-based webservice.
For more information on how to expose a NAV page as a webservice, please refer to https://msdn.microsoft.com/en-us/library/dd355316(v=nav.90).aspx (SOAP) or https://msdn.microsoft.com/en-us/library/hh166960(v=nav.90).aspx (OData).

You can Integrate your third Party apps with dynamics Nav by using OData Link
Microsoft Dynamics Nav 2016 and greater versions support these features
To Get OData Base URL you have to run dynamics nav Administration Shell as an admin
Click on OData Services here you can Get Odata Port and URL
IF your OData Service is not Enable than click the check box and restart the Dynamics Nav Instance

Related

What are Dynamics NAV licensing requirements for Web Services?

This post refers to SOAP and OData Web Services in Dynamics NAV 2016 (or later) and hopefully it is not off-topic. I would like to know whether the following facts are true or false (or it depends).
Given Starter Pack functionality, and default Customer License with no extra Development Granules:
A Full User can publish any page (say, Customer or Employee) as a Web Service.
When consuming a published Web Service from another software service, a separate NAV user should be created and not be associated with a real person - and this is fine with respect to NAV's licensing (e.g. Perpetual Licensing with Concurrent Client Access Licenses).
A Full User can create a codeunit (in the allowed range of 10 codeunits for the Starter Pack) and publish the code unit as a Web Service.
Both a Full User and a Limited User can be used to authenticate against a Web Service.
In other words, I would like to know to which extent is a customer of Starter Pack (no extra Development Granules) able to integrate NAV with other software systems via SOAP / OData endpoints - without relying on the elevated development capabilities of a Certified Partner / Value Added Reseller.
Microsoft Dynamics NAV 2016 Product Overview and Capability Guide
Walkthrough: Registering and Using a Page Web Service (SOAP)
MS Dynamics NAV - development licensing basics
Upon cross-posting on dedicated Dynamics forums (Dynamics NAV Users and Dynamics Community), I reached the following conclusions:
True.
True, but must be aware of licensing issues related to multiplexing. Multiplexing is not allowed. More comments about Web Services and internal / external users are here.
Partially true. A Developer License is required to create new codeunits - a Customer License doesn't suffice. Existing codeunits can be published as Web Service though.
True.

Calling an external API from Microsoft Dynamics Nav

I am researching how to integrate Microsoft Dynamics NAV with my existing REST API (built on Django REST Framework). What I would like to do is trigger API calls from NAV to CRUD objects via the REST API.
Reading the web services docs for NAV, it seems clear that NAV can expose a web service for other software to consume from. But can NAV consume 3rd party APIs? In the web services examples documentation, it says:
Solutions that need to execute business logic or read data from
Microsoft Dynamics NAV are candidates for Web service implementation.
These can also be solutions that write data to Microsoft Dynamics NAV
and validate the data using existing business logic.
Also, it gives the following example of how to use web services:
Execute any kind of business logic that is more easily developed and
managed in Microsoft Dynamics NAV.
However, I don't see any examples of data writing. It doesn't seem that in the exposure of web service pages or codeunits, there's a way to make calls to 3rd party APIs and execute business logic with the data that comes back within NAV. Is this actually possible?
Unfortunately not, no.
You do however have access to the full .NET framework from within the 'Development Client' of Dynamics NAV - When defining your variables select the Type of DotNet
It's far from perfect, so for larger tasks I'll create AddIns or completely external libraries (depending on version).
For something smaller like this I personally find it easiest to write it in C# as a small (console) app and the 'translate' it back into Dynamics NAV.
If you are looking for way to invoke a web service then why do you need Nav web services? Nav web services is a way to call Nav.
These can also be solutions that write data to Microsoft Dynamics NAV and validate the data using existing business logic.
This means if you invoke published Nav web service then you can pass data to your call and the data will be validated and saved to Nav. So this is about how to push data to Nav, not pull from external system.
If you want to invoke a web service from Nav consider this options:
Write external wraper library (as mentioned by #SeeSharp or as described). Then use it in C/AL as DotNet or Automation types of variables.
Use existing libraries like 'Microsoft XML, v6.0'.XMLHTTP60 right in C/AL to make http calls to your web service.
Do it Navision style.
Last damn option is to write console application that will consume your web service and call it from Nav using shell. This is not an option, I know.

How to write a custom web form in Dynamics CRM 2013

I have a requirement of a custom grid in Microsoft Dynamics CRM 2013. From a SharePoint perspective, it would have been a web part. But in CRM 2013, I don't see a similar concept. I need the custom grid to be displayed in a pane for an Entity in CRM? How could that be implemented if possible? Any ideas?
Your question is to broad, but i think what you mean is how to make a custom web page in CRM.
In Dynamics CRM 2013, you cannot add a custom aspx page, as part of a CRM,
you can only put custom Silverlight and HTML/Javascript powered web pages, the latter being the preferred way, of creating these.
However if you need to create a custom web application, you can create it as a separate web application in a separate IIS website, use the CRM web services to access data, and then embed this web application in an iframe on an entity form in CRM.
In order to connect to the crm web service, from custom apps you can use early or late binding.
Early binding sample code
Late binding sample code
Personally i use late binding as connection is easier and it seems to have better performance. The simplest way to obtain a connection to the CRM service for CRUD operations is the following code:
string connString = "Url={DynamicsCRMUrl}; Username=username; Password=password; DeviceID=AnyDeviceId; DevicePassword=AnyDevicePasscode";
CrmConnection crm = CrmConnection.Parse(connString);
IOrganizationService service = (IOrganizationService)new OrganizationService(crm);
For crm online and IFD configured CRM you must add the DeviceID and DevicePassword, for on premise it is not necessary.
Make sure you have the CRM 2013 SDK for the required assemblies.
I am answering the question with a long shot, with assumptions, as i am not sure if this is what you require, but i hope it gives you guidance.
You can add an HTML WebResource in CRM that contains the grid to be displayed.
Depending on what you want to display on the grid, the data could be populated using the Dynamics CRM SDK REST API. (see SDK.REST.js).
Once you have set-up your HTML web resource, you can then include it in your entity form as an iframe component (similar to a SharePoint web part).
This approach means you don't need to host the grid in a separate website, but can include it as part of your CRM solution.

Dynamics Nav 2013 Web Client Page in Other Website

I have found interesting Dynamics Nav Web Client functionality thanks to which we can create Dynamics Nav Page as part of other website. It's cool thing, but how it's look with user license?
Is it possible to create website which has Dynamics Nav Web Client Page where everyone can do something(including people without Navision license)?
It's not possible - at least not in a way you access a public website, where the number of connections is limited only by the server's resources. Actually, connecting to a Nav server via a web client is not much different than using a Windows client or Sharepoint client from the licensing point of view. In any case, the client doesn't hold the license. License file is uploaded on the server, and the server side is responsible for keeping an eye on license restrictions.
Since Nav uses concurrent licensing model, any user who can authenticate, is able to connect to the server as long as the number of concurrent sessions does not exceed the licensed limit, no matter which client they connect with.
You can read more about Nav licensing on MSDN or download a Licensing Guide

SharePoint Web Part using Dynamics CRM 2011 web services

I'm want to create some SharePoint 2010 Web Part which could retrieve data from Dynamics CRM 2011 web service. I can not add references to the CRM dlls because the web part will be using assemblies of .Net 3.5 version, and I get a troubles when I try to deploy my Web Part with assemblies of .Net 4.0 added.
Can I use these Web services without adding CRM assemblies?
You could use a service reference which targets the WSDL-endpoint. See http://msdn.microsoft.com/en-us/library/gg509052.aspx for more information.