Posts

Showing posts with the label Dynamics AX

Export Data from AX 2012 - using DIXF (Data Migration Framework)

Importing is a well known task using DIXF, but at times we do need to export as well and then import it back in AX 2012. The export task can be done with the help of this information. https://technet.microsoft.com/en-us/library/dn144987.aspx Define the format of your source data Open  Data Import/Export Framework  >  Setup  >  Source data formats . Click  New , enter a name and a description, and then select  AX  from the  Type  list. Define a processing group to export data from Microsoft Dynamics AX Change the company to  CEU . In  Data Import/Export Framework , click  Common  >  Processing group , and then click  New  to create a new processing group. Set the group name to  Export-Cust  and add a description. Click  Entities  to select the entities to include in the processing group. In the  Select entities for processing g...

Dynamics AX 2012 - Table Keys

Terminology for keys Important concepts. Term Description foreign key In Microsoft Dynamics AX, an AOT node under  MyTable  >  Relations  represents a foreign key.  natural key A key whose value has meaning to people. Most replacement keys are natural keys. surrogate key A key whose value has no meaning to people. A large number generated by the system, such as RecId, could be a surrogate key. unique key A broad term that applies to primary keys and to alternate keys. It does not apply to foreign keys. This term emphasizes that all values for a given key must be unique within one table. All fields in a unique key must be not-nullable.

Email Alert Settings - AX 2012

The issue with email templates encountered by us is as follows. - When we setup alerts template for email from Organizational Administration > Setup > Alerts > Alert parameters The selected Email ID will only be used when the created alert is not GLOBAL . That is, Organization-wide must not be checked for the alert if these defined template must be used for the specific alert. In case GLOBAL is checked, then the default Template setup in System Administration > Setup > System parameters > Alerts  Email ID  will be used.

Email Template for Alerts Dynamics AX 2012

We can use the following Email Template as referred by Microsoft Copy Paste the following HTML template Source http://technet.microsoft.com/en-us/library/aa834376(AX.50).aspx %subject% %message% Go to   %for% Microsoft Dynamics AX alert details Occurred: %occurred% For: %for% Company: %company% Event: %subject% Data: %data% View alerts Manage alert rules Note: You may receive an error if Microsoft Dynamics AX cannot be launched from this computer. %message% Go to   %for% Microsoft Dynamics AX alert details Occurred: %occurred% For: %for% Company: %company% Event: %subject% Data: %data% View alerts Manage alert rules Note: You may receive an error if Microsoft Dynamics AX cannot be launched from this computer.

MS Dynamics AX 2012 Payroll - Rate basis

Select the rate at which the earnings are calculated. For example Select Hourly for hourly earnings. If you are creating an earning with an amount that is paid over a period of time, select Pay period, Monthly or Annual. Select Flat amount for one-time earnings.

MS Dynamics AX 2012 Payroll - Unit of measure

Unit of measure - Hours - Each - Pieces Select Hours for all earnings which pay out based on time or salary. Select Each for all earnings which pay out based on dollars only such as a bonus, fringe benefit, etc. Select Pieces for earnings which payout based on the number of pieces processed. Examples: For House Rent use Hours For Basic Salary use Hours

Manual Configuration AX 2012 Report Server

Image
Somehow after the installation, we dint get the initial setup for the following navigation. System Administration > Setup > Business Intelligence > Reporting Services > Report Server Get it setup manually as follows

Dynamics AX 2012 - Enable SQL Analysis Services

Image
To proceed with the installation of Analysis Services for AX 2012 as shown below, we need to enable and install SQL Analysis Services first. Once we proceed with the installation, the need to have SQL Analysis Services is identified. When installation of SQL Services is complete please do start the services as follows - Issue faced was that we were unable to start the service. To resolve this issue, just change the user name and password with the valid domain service user account and password. It will work then

Create and setup a new company - Microsoft Dynamics AX 2012

Image
General Ledger Setup Create a new Company Organization > Run Number Sequences Wizard - Run the Wizard Go to GL Setup > General Ledger Parameters and set some parameters there Batch Transfer mode > Synchronous Ledger > Voucher > Accept duplicates. General Ledger > Setup > COA Create a new COA - JAK JAK COA Create a new fiscal calendar first JAK Holding Calendar Create a new fiscal year for 1 or 2 years then. General Ledger > Setup > Ledger Select COA, Fiscal Calendar, Currency GL > Setup > Financial Dimensions. Create a new one. Create a Department and Cost Center Financial Dimensions. Create main accounts General Ledger > Common > Main Accounts 101 Cash in Hand - Balance Sheet 102 Cash at Bank - Balance Sheet 103 Financial Inventory - Cement  - Balance Sheet. Do not allow manual entry. 104 Financial Inventory - Stee...

Getting Approver Information from Workflow - Dynamics AX 2012

Task to get the last approver of the workflow. Job gives the output as name of the approver of the required ID of the workflow static void workflowApproverInfo(Args _args) {     WorkflowTrackingStatusTable  workflowtrackingstatustable;     WorkflowTrackingTable        workflowtrackingtable;          while select workflowtrackingstatustable         order by RecId desc     join workflowtrackingtable         where workflowtrackingstatustable.ContextRecId == 5637155826 //(Required Record)            && workflowtrackingtable.TrackingContext == workflowtrackingcontext::WorkItem            && workflowtrackingtable.TrackingType == workflowtrackingtype::Approval            && workflowtrackingtable.WorkflowTrackingStatusTable == workflowtrackingstatusta...

Connecting Visual Studio with a different Config File - Visual Studio 2010 and Dynamics AX 2012

Image
Visual studio must be installed on that machine. Live/Test configuration file must be saved on that machine. Steps: 1. Launch cmd 2. Navigate to the dir where VS is installed. In my case it is : Chdir  C:\Program Files\Microsoft Visual Studio     9.0\Common7\IDE\ 3.   Enter the command:  devenv.exe /AxConfig "enter here the live/test client config path"      eg. devenv.exe /AxConfig "C:\AX CONFIG\Live cus.axc" Go to View in Visual studio, click Application explorer. This would show the entire Test/Live AOT. You can then edit any report you would like. Screen shot as follows of the command prompt

Console Application to test Class Library code - AIF File Transformation

Console application code as follows static void Main(string[] args)          {              Stream input, output;              input = File.Open(@"C:\TEMP\ASN.xml", FileMode.Open);              output = File.Open(@"C:\TEMP\ASN_Output.xml", FileMode.Create);              StreamReader reader = new StreamReader(input);                                //string contents = reader.ReadToEnd();                          using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("AsnTransform.AsnStylesheet.xslt"))              {                  XPathDocument document = new XPa...

AIF Transformation of Sales Order and ASN - Custom Code in Class Library

Image
We used the following code to meet specific requirements of transformation. 1- Sales Order Transformation using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml; using System.IO; using Microsoft.Dynamics.IntegrationFramework.Transform; namespace SalesOrderTransform {     public class Class1:ITransform     {         public void Transform(System.IO.Stream input, System.IO.Stream output, string config)         {             StreamReader sreader = new StreamReader(input);             XmlTextWriter xwriter = new XmlTextWriter(output, Encoding.UTF8);             string tagName = "SalesOrder";             string inputXml = sreader.ReadToEnd();             xwriter.WriteStartElement(tagName);      ...

Job to Test AIF Services - Debug AIF

We can debug and test AIF Services via this job code manually. static void JobTest(Args _args) {     AifOutboundProcessingService    service;     AifGatewaySendService   send;     service = new AifOutboundProcessingService();     send = new AifGatewaySendService();     service.run();     //send.run();     //service.run(); }

AOS Restarting issue - Every time when a record is updated Inline

First we drilled down to the location where it was happening - Look into the form where the issue was reproduced. - Personalized and check the data structure involved in it. - Checked if any customization was done on those tables - When reverting the changes and compiling it, the issue of AOS Restarting got resolved.

AIF Issue with Transformation - Object Reference not set to an instance of an object

We encountered problem with the transformation of ASN and Sales Order invoice when moved to R2 from RTM. The basic issue identified was with the referenced version of Microsoft.Dynamics.IntegrationFramework DLL There were some identified version changes in RTM and and R2. So we build the solution again with the new referrenced DLL and it worked for one transformation of Sales order. Another Issue - We have an XSLT file to be accessed in the transformation code as follows. - It was embedded in the code and DLL was accessing it like this The solution was to place the file in System32 Folder of XSLT and code the following.  Stream inputXML = File.Open(@"AsnTransform.AsnStylesheet.xslt", FileMode.Open);   // Reads file from System32 folder  if (inputXML != null) {     //Code here }

SSRS Reports Deployment - Dynamics AX 2012 via Command Prompt

We can use this command Publish - AXReport - ReportName CustTransList, CustTransOpenPerDate For All the Reports Publish - AXReport –ReportName *

How to pass the optional parameters - Dynamics AX 2012

Passing optional parameters in Dynamics AX 2012 functions and methods Add these to the end of the passing parameters in your function declaration. Just default to null or empty values. void functionname (BirthDate dob = datenull(), FirstName firstName = '', LastName lastName = '', VendTrans _vendTrans = null  );

Duplicate SSRS Reports in Dynamics AX 2012

Image
Able to duplicate the report by following the blog entry on the following http://tech.alirazazaidi.com/dynamics-ax-2012-how-to-duplicate-the-existing-report-for-modification/ Steps to follow to duplicate the Report 1- Duplicate the classes first via AOT 2- Create a new Visual Studio Project - Reports and add it to AOT as well 3- Duplicate the Report from Visual Studio - Application Tree 4- Modify the report and make any changes to the code after copying. Encountered the following issues - When tried to point the database to the new DP Class, then Visual Studio giving an error. - This error was resolved by creating a new dataset and then deleting the old one. (Deleting the Dataset is important point ! as without that it will not allow you to proceed) - However you also need to adjust the output parameters as adding a new dataset will introduce new output parameters which need to be removed. Do remember to refer to the old parameters. This is a tedious task, but need to ...

Dynamics AX 2012 Reports SSRS - The remote server returned an error: (500) Internal Server Error.

Encountered many times when a new or old report is deployed The remote server returned an error: (500) Internal Server Error. Resolution is very simple 1- Restarting the SSRS Reporting Services from services.msc 2- S ystem administration  module , set-up  ,service and application  integration  framework , in bound port , bi service stop the services and restart the services. and restart the reporting services