Consume document service from Dynamics ax 2012 office Addin

Question:
I got a query on how we can consume the webservice from new Office addin available in Dynamics AX 2012. The answer is explained below.

Answer:
One would need to stup AIF webservices before consuming it through office addins. You also needs to install Web services on IIS addin from Dynamics AX. steps for for configure webservice are listed below

Procedure: Set Up an Enhanced Inbound Port
To set up an inbound port for entering AIF customers, follow these steps:
1. Go to Administration > Setup > Services and Application
Integration Framework > Inbound ports.
2. Click New.
3. In the Name field, type “ServiceOrders”.
4. In the Description field, type “Service orders”.
5. Click Service operations.
6. Drag the service operations starting with “SMAServiceOrderService”
from Remaining service operations to Selected service operations.
7. Close the Restrict service operations form.
8. On the top of the screen click Activate.
9. Go to http://localhost:8101/DynamicsAx/Services/ServiceOrders to
view the WSDL of the Inbound port that you just activated.

For setting up the Office addin to consume the web service, see my earlier post

Office Addins Dynamics AX 2012

Office Addins Dynamics AX 2012

In the newer version AX2012, Their is a great Addin available called Office Addin, with this Addin the data Import/Export is really easy. The office addin also have the out of box consumer for comsuming the AX document services. This is real cool feature. You can use this addin to export data from Table, or if you need to export data on some criteria, then you can build the AOT queries to do the query based export. The Addin can be used to consume the web service operation, means Now you can fill the record in excel and just published, the record will be created/ updated in AX, read operation is also supported with this Addin. see pictures below for look of this tool.

Inorder to install it you need to run the setup, in the Addins you will find the Addin for Office. The installation is really simple, just next next and finished.

Once setup is installed, you have to do some setup in dynamics ax to use the addins.
Under Organization Administration> Setup> Document Management > Document datasources
On this form you need to do the setup, if you want to consume any document service from office addin, or you want to use the Query based export. Simply create a new record, specify the type of datasource (service/ Query), select the service or Query and make it active.
Note: this setup is not required for Table export.

Once the Addin installed, you will see the Dynamics AX tab in you Excel. You will see options like, Add data (for selecting service/ Query) , Add Table (here you can select Tables from AX). you will also find option for publishing the data to and from Dynamics AX. See screen below.

After selecting the Table, Query, or Service click Ok. This will open the Fields Choser in Excel where you can select the fields or drag it to Excel sheet.

Close the fields choser, click the Refresh data to see the data in excel,

In case or Web service, you can create records in Excel or modify the record in Excel, click the publish button to insert/ update records in AX.

Follow

Get every new post delivered to your Inbox.

Join 123 other followers

%d bloggers like this: