Pages

Tuesday 4 October 2016

INSTALLATION GUIDE FOR MICROSOFT DYNAMICS AX 2012 R3

Today I am going to illustrate how to install Dynamics AX 2012 R3 from scratch.

Please make sure that the AX prerequisites are installed already before starting installation of AX. Now I will illustrate the step by step AX installation.

STEP-1 INSTALLING AX DATABASES
(a) Open the Dynamics AX setup and double click on Autorun.















(b) The AX installation setup screen will open.



















(c) Now click on Install Microsoft dynamics AX components.



















(d) Now click next to go to the installation type selection page.
























Tuesday 14 June 2016

Consume XML File as Web Service SOAP Request

XMLports are used to export data from a Microsoft Dynamics NAV database to a file or import data from a file to a Microsoft Dynamics NAV database. Expose a codeunit as a web service that import data as XML. It work as receiver and support bulk data insert.

Create Item Buffer Table.














Create XML Port for the table


































Create Codeunit which expose as  WebService











Publish Web Services









Check the WSDL using Internet Explorer

















Use Boomerang – SOAP and REST Client





















  • Create new project
  • Create a Service
  • Enter WSDL URL and Service name. (Published Web Services in NAV - image 3)
















Click on Request on left hand side and Create XML as per image

Click on Send

Check the Item Buffer Table, Data is imported into the table.

Sunday 15 May 2016

Navision 2016: Using a Codeunit Web Service (SOAP) for Customer details

Creating and Using a Codeunit Web Service (SOAP)
Web services provide easy communication and data exchange in a secured environment. In Microsoft Dynamics NAV 2016, you can create, publish, and use web services. For example, you can publish a web service that return customer’s details in response.

Enable SOAP Web service
















Creating a codeunit in Microsoft Dynamics NAV.

















Publish Web Service
1.     Open the RoleTailored client, and then connect to the CRONUS International Ltd. company.
2.     In the Search box, enter Web Services, and then press Return.
3.     In the Web Services page, choose New.
4.     In the Object Type column, select Codeunit, then in the Object ID column enter 50000, and then enter Letters in the Service Namecolumn.
5.     Mark the check box in the Published column and choose OK to close the New - Web Services page.









Using the web service

1.     In Visual Studio, on the File menu, select New, and then choose Project.
2.     Under Installed Templates, expand the Visual C# node, select Windows, and then, select Console Application.
3.     Enter the name UsingLettersService for the application and choose OK to close the New Project page.The sample code in this walkthrough expects this exact application name, so do not change it.
4.     In Solution Explorer, right-click the References node in the project, and then choose Add Service Reference.
5.     In the Add Service Reference window, choose the Advanced button.
6.     In the Service Reference Settings window, choose the Add Web Reference button, type or paste the URL that you used when you checked the WSDL, such as http://localhost:9047/DynamicsNAV90/WS/Services, and then choose Go (the green button with the arrow).



7.     When the Letters service is displayed on the discovery Page, choose View Service, then in the Web reference name text box, renamelocalhost to WebService, and then choose Add Reference.
8.     In Solution Explorer, choose Program.cs and replace the existing code with the following code:

using System;
using System.Collections.Generic;
using System.Text;
namespace UsingLettersService
{
    // Imports newly generated web service proxy.
    using WebService;
    class Program
    {
        static void Main(string[] args)
        {
            // Creates a new instance of the service.
            Letters ws = new Letters();          
           
            // Uses default credentials for authenticating
            // with Microsoft Dynamics NAV.
            ws.UseDefaultCredentials = true;
            ws.Url = "http://localhost:9047/DynamicsNAV90/WS/CRONUS%20International%20Ltd./Codeunit/Letters";   
            // Declares variables to work with.
            string inputstring, outputstring;  
            inputstring = "20309920";

            // Calls the Microsoft Dynamics NAV codeunit web service.
            Outputstring = ws.CustomerDetails(inputstring);
            // Writes output to the screen.
            Console.WriteLine("Result: {0}", outputstring); 
            // Keeps the console window open until you press ENTER.
            Console.ReadLine();    
        }
    }
}

On the Build menu, select Build Solution to build your project and then, from the Debug menu, choose Start Debugging to run the application in debug mode.

Output:
Name      Email Id