Pages

Sunday, September 25, 2016

Document Data Sources and integration with Excel

On below video you can watch how to create document data sources service. Document data sources are used to integrate AX Queries with Excel. Excel must have installed PowerPivot plugin . Data from Document Services are only read-only. This integration can be used to create small, simple Bi system in your company.


You can also connect Document Services with Visual Studio. Just add service reference with correct address.
You can see example, written in C#.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ODATA_Test.MAN_CustomersNS;
using System.Net;

namespace ODATA_Test
{
    class Program
    {
        static void Main(string[] args)
        {
            var uri = new Uri("http://192.168.20.6:8104/DynamicsAx/Services/ODataQueryService" );
            ODataQueryService service = new ODataQueryService(uri);
            service.Credentials = new NetworkCredential { UserName = "***", Password = "***" , Domain = "***" };

            var query = from c in service.MAN_Customers
                        select c;

            foreach (MAN_Customers item in query)
            {
                Console.WriteLine(item.CustTable_AccountNum + " "   + item.DirPartyTable_Name);
            }

            Console.ReadKey();
        }
    }
}

Sunday, September 18, 2016

How to start workflow in AX2012

If you would like to start workflow in your AX2012 instance do following steps:

1. Create tree batch groups.


Remeber to add proper AOS servers on Batch Servers tab.






















Please, check as well if you have configured user for workflow in Workflow execution account. As you can see I have the same acccount as Business Connector. This is Ok for DEV/TEST enviroments. On LIVE I reccoment to have separate account for workflows.

























2. Run Wizard. You can find it at System administration\Setup\Workflow\Workflow infrastructure configuration. Press Next and in every page select created previously batch group. Setup time periods in which you would like to have Workflow working.


3. You should see new workflow batch jobs. If yes, then all goes OK.

Workflow will not work if CIL won't be fully compiled without any errors.



Hi, I'm Michal

I would like to share my daily findings in Dynamics AX development and configuration and related topics connected with programming.

If you would like to tell me something, please wirte email mandruchow@gmail.com or write a comment.

Many thanks!