Thursday, July 31, 2014

Mandatory Fields on Dialog Form

Problem: Need to make dialog fields mandatory such that users cannot proceed without entering require info.
Environment : AX 2012R3.
Module : Service Management
Difficulty : Easy

This occurs when i try to move the service order around different stages. The standard dialog appears as shown below. 
To make these fields mandatory open the class: Classes>>SMAStageEngine. In the dialog method, add the following lines as shown. NB your intellisense my not show the mandatory method, you can however type it as shown.

This will achieve your aim BUT you will notice that despite your fields showing the require fields underlined in red, the behavior of the dialog will be somewhat strange as you will be able to proceed without entering any data.
To get around this, override the validate method of the runbase class, and add the following depending on the fields you want to apply in your scenario.

Once this is done you can be guaranteed that records will be validated to make sure data is entered in your dialog fields.

Happy Daxing!


Wednesday, July 16, 2014

Send Email using Dynamics AX

I have been away from blogging for a while because DAxing kept me occupied round the clock. I will try and add as many posts as i can while im having a short break. To get us started we need to create a class that we can later consume in this demo to show how we can achieve this goal.
Among other things your class should be able to check the validity of the email provided, check for templates if you are using any then lastly it should send the message.


Now that was the easy part, we can now explore the easier parts of this demo. Go to 
System administration >> set up >> system >> Email-parameters

Configure your parameters as required.
Next configure your batch server and email batch as shown below.
System administration>> set up >> Batch group
System administration>> set up >> Email Processing>>Batch
Organisation administration >> Set-up>>Email templates
Now all our configurations are ready.
Now for the easiest part of this walkthrough, create a job to test the email functionality from DAX. I'd be glad to help further!

Happy Daxing

Wednesday, January 1, 2014

Dynamics AX and BIG Data

Ever wondered how the coming world of BIG Data is set to affect your organisation or future ERP implementations?? This short video from Microsoft can give you some future insights, exciting times ahead!!

Friday, December 27, 2013

You must install SQL Server 2005 Analysis Services with Service Pack 2 or higher before installing the Analysis extensions.

SQL Analysis Services for DAX 2009 is one of the most annoying components to install. My typical DAX installation is built on the following: Windows Server 2008 R2 with SQL Server 2008 Reporting Services and SQL Server 2008 R2, Microsoft Dynamics Axapta 2009 with Service Pack 1 and Roll-up 7. However on running the installation I got the following error: You must install SQL Server 2005 Analysis Services with Service Pack 2 or higher before installing the Analysis extensions.


This error message highlights that there is an Analysis Services 2005 version of the Microsoft.AnalysisServices.dll file in the Global Assembly Cache. Microsoft Dynamics AX does not support running Analysis Services 2005 and Analysis Services 2008 on the same computer. To resolve this issue, uninstall the Microsoft.AnalysisServices.dll file that has a version number of 9.0 from the Global Assembly Cache (typically located at C:\Windows\assembly). Go to this folder and remove all references to the of the Microsoft.AnalysisServices.dll version 9.0. For more information on removing and adding reference see this page gacutilOn running the installation once again, you get the following,



I can see the smile on your face. Complete the installation steps and you should get the following screen.

Thursday, December 19, 2013

AX Company Name in SSRS Reports

Often the need to show the company name is very important in SSRS reports for Microsoft Dynamics AX 2012. This is very useful in Multi-company set-up.

To achieve this create your textbox, right click and in the context menu select expressions. Use the following expression to return the current company =Microsoft.Dynamics.Framework.Reports.DataMethodUtility.GetFullCompanyNameForUser(
  Parameters!AX_CompanyName.Value,Parameters!AX_UserContext.Value)  I hope this is helpful.

Thursday, July 12, 2012

Error Importing In Dynamics AX 2009

Implementations can be very stressful sometimes especially if the seemingly simplest of tasks seem to take you forever to get sorted. I had a junior consultant who ran into such a scenario in one of his implementations. Consider a case where you are taking on data, thousands of lines from your Excel, to your Dynamics AX 2009 application. After successfully importing the transactions but perhaps noticing you made some mistake in your import, you modify your Excel and try again and BANG........!!!



Dont worry!! This requires a small fix!


Step1: Select the definition group that you are trying to import and click Table Setup

Step2: Go to the 3rd column, Import status, and change from imported in total to import. Save and close the form


Step3: Click import on the Data import/export definition group form and click import

there you go, all data is imported


Happy Daxing My Friends!!!

Friday, July 6, 2012

Consuming currency web service in AX 2009

Im going to show you how to consume a web service in Dynamics AX. I had a requirement to consume currency exchange rates between my customer and a bank. however the bank did not have any available web service. So my B2B integration required me to create a web service at the bank end and then consume it again at my customer end. I will share with you how i consumed it in Dynamics AX2009.


In this demo we are going to do:


1) Create a service reference in AX2009

  • Go to  AOT > References > Right-Click Add New Service Reference.
Note WSDL URL should refer to your web service http address or in this case a free web service which is equally good.
The ExchRateWebService is the name of your reference.


2) Create an AX2009 class to consume the service

  • Next  AOT > Classes and create a new class

public class EtugExchRates 

{



}

  • add the following method to your class

3) Create a Job to test the code in AOT >Jobs
4) Go to General Ledger>Setup>Exchange Rates after running the job to see the result

Happy Dax++ng guys!!