Thursday, May 22, 2014

Things you did not know about Microsoft Dynamics AX 2012 R3

Here are 6 things you might not know about Microsoft Dynamics AX 2012 R3:

1. There are no longer extra GL entries generated from the two voucher item posting strategy
This corrects a design issue when the distribution framework was introduced in AX2012.  Fewer entries are made to the GL and the normal effect of posting a receiving to accrued purchases shows in a more sensible way.

2. There are now additional Inventory Storage Dimensions for Inventory Status and License Plate
Inventory statuses can also be tied to blocking features to only allow inventory that is truly available for immediate sale

3. The reservation Hierarchy determines how dimensions are used in the warehouse
The reservation hierarchy is the key to warehouse management and automation and can be configured differently for items that require more detailed manual reservation.  Understanding the hierarchy is important to the overall system automation and flow.

4. Items must be assigned to a storage dimension that is Warehouse Manageable from the beginning
Items must be associated with the correct storage dimension at creation.  Changing the storage dimension after transactions exist is not supported.  Microsoft will be introducing conversion utilities for existing customer installations post release.  Make sure to work closely with your account manager and solution delivery manager to plan your upgrade.

5. AX 2012 R3 will be available in the Cloud on Microsoft’s Azure server platform
Once released this could be the fastest and most cost effective way to deploy both development and UAT infrastructures for Dynamics AX.  There are still costs directly with Microsoft to run Azure servers but the overall speed of setup and the elimination of any hardware purchase make this a compelling offering.  And with Azure you only pay for server time used!

6. PowerQuery is a free download as an addin to Excel 2013 and 2010 that can integrate directly with your instance of AX2012 company data
PowerQuery allows an AX user to connect directly with Queries and Services exposed to the document framework of the Excel Addin. This allows easier creation of business intelligence reports on AX data directly connecting to the AX company database.  This does not require Office365 and can run standalone.



Copied from http://www.uxceclipse.com/pages/blog-detail.aspx?newslist=Blog%20List&itemId=19 just for reference.

Tuesday, May 20, 2014

Microsoft Dynamics AX report viewer control exception workaround

If you are facing exceptions in Event Viewer related to Microsoft Dynamics AX report viewer control like:

An unexpected exception occurred in the Microsoft Dynamics AX report viewer control. Contact your system administrator for assistance.
The type 'Microsoft.SharePoint.Portal.Analytics.UI.ReportViewerMessages, Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' could not be found

OR

An unexpected exception occurred in the Microsoft Dynamics AX report viewer control. Contact your system administrator for assistance.

Object reference not set to an instance of an object.
System.NullReferenceException
   at Microsoft.Reporting.WebForms.ReportViewer.OnPreRender(EventArgs e)

Here is the simple workaround of these issues:

you have to comment out the ReportViewerMessages line in appSettings section in the report server web.config


So far, I haven’t seen any issues by commenting out this entry.


Saturday, April 26, 2014

Upgrade SSRS reports from Dynamics AX 2012 to AX 2012 R2

Sometime upgrade from Dynamics AX 2012 to AX 2012 R2 is really painful specially when we have huge customization on existing object related to EP, SSRS reports and of course Forms. I got following error when i tried to deploy some modified report which upgrade to R2:

Error      Message (12:17:24 pm) An error occurred while deploying the report ProjListTransProj. 
This might be because the SQL Server Reporting Services extensions have not been installed on the report server, or configuration information has not been entered in the Report Servers form in Microsoft Dynamics AX.

Error      Message (12:17:24 pm) System.Web.Services.Protocols.SoapException: Error while loading code module: ‘Microsoft.Dynamics.Framework.Metadata.AX, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’. Details: Could not load file or assembly 'Microsoft.Dynamics.Framework.Metadata.AX, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
   at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, Warning[]& Warnings)
   at Microsoft.ReportingServices.WebServer.ReportingService2005.CreateReport(String Report, String Parent, Boolean Overwrite, Byte[] Definition, Property[] Properties, Warning[]& Warnings)

Info        Message (12:17:24 pm) Report name: ProjListTransProj
Design names: ProjListTransProj.Report
Deployment status for design names: Error
Assembly names: ProjListTransProjReport.BusinessLogic.dll, DrillThroughCommon.dll
Deployment status for assembly names: Success, Success

One solution if this error is to open respective VS report project in VS environment and build it and deploy it. But in some cases its not working. 
so the other workaround is to hack the code, you should export the report which throw above error, and open the XPO in notepad and search the tag 6.0.0.0 and replace it with 6.2.0.0. You should also search tag "6.0.14.0" and replace it with "6.0.15.0".
Here is the sample:
#
#    Microsoft.Dynamics.Framework.Reports, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
#    Microsoft.Dynamics.Framework.Metadata.AX, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

to replace with:

#
#    Microsoft.Dynamics.Framework.Reports, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
#    Microsoft.Dynamics.Framework.Metadata.AX, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Happy Daxing

Monday, April 14, 2014

Create sales order from sales quotation

Following code is used to create sales order from sales quotation:
static void createSalesOrderFromQuote(Args _args)
{
    SalesQuotationTable             salesQuotationTable = SalesQuotationTable::find("quotation Id");
    SalesQuotationEditLinesForm     editLinesForm;
    ParmId                          parmId;
    
    editLinesForm = SalesQuotationEditLinesForm::construct(DocumentStatus::Confirmation);
    
    parmId = editLinesForm.parmId();
    
    editLinesForm.initParmSalesQuotationTable(salesQuotationTable);    
    editLinesForm.parmTransDate(systemDateGet());
    editLinesForm.prePromptInit();
    editLinesForm.initParameters(NoYes::No, NoYes::No, NoYes::No, NoYes::No, NoYes::No, '', NoYes::No); 
    
    editLinesForm.run();
}

Happy Daxing !!!

Friday, February 28, 2014

Development patterns in Microsoft Dynamics AX 2012

To choose the appropriate programming model and tools for your business application development, you must first identify the basic development patterns that can be combined to create your application. Development patterns are the building blocks of any business application, and they fall into the following categories: 
  • Customization 
    • Alteration 
    • Extension 
    • Enhancement 
  • Integration 
  • External application module development 
    • Custom dedicated applications development 
    • Report development 
    • Enterprise Portal Web application development
Although real-life applications rarely fit neatly into a single development pattern, it is possible to identify large parts of an application that fit into one of these development patterns. It is important to understand these pattern categories, because each of the following programming models in Microsoft Dynamics AX is best suited for to one of these development patterns. The following sections provide definitions and an example of each development pattern.
 

1. Customization

Customization is the development pattern in which you create new functionality by altering, extending, or enhancing the functionality in the shipped product. 

Alterations to the base functionality are achieved by changing the metadata and source code of the base application. This is done through the alteration of artifacts such as X++ classes, tables, and Visual Studio projects in a higher layer, such as, for example, the ISV layer or the VAR layer. The unique layering feature of Microsoft Dynamics AX enables the system to synthesize the final application logic to be executed at run-time by aggregating the metadata and code modifications across all the layers. You should be aware that this layer-based customization capability is applicable to all artifacts stored in the Microsoft Dynamics AX model store, including the Visual Studio project artifacts.


Extensions to functionality are achieved by incrementally increasing base functionality by adding to the source code in the business logic of the base application. 


Enhancements to the application are achieved by adding new functionality originally unavailable in the base application. Typically, an enhancement is larger in scope than an alteration or extension. An example of customizations would be a scenario in which a new regulation from the government requires the existing sales tax computation business logic to reflect the inclusion of an additional “environmental sustainability tax” component. If the calculation behind this new component is straightforward and simple, you can simply alter the base tax computation logic in a higher layer and directly implement the required source code changes. However, if this tax module has business rules that are more complex, you should consider enhancing the base product with a new tax engine component that implements these requirements. 


2. Integration 

Integration is the development pattern that involves enabling existing applications (not written exclusively for Microsoft Dynamics AX) to interact and work with Microsoft Dynamics AX across process boundaries. An example of integration is when a value added reseller (VAR) integrates with an existing legacy Customer Relationship Management (CRM) system to synchronize the customer list between Microsoft Dynamics AX and the legacy CRM system.


3. External application module development 

The development pattern for application modules that run out-of-process of the AOS server or Microsoft Dynamics AX client processes. 

Custom dedicated application development is the development pattern that builds a new, custom external application/client that accesses functionality and data in the Microsoft Dynamics AX system. These applications can span multiple platforms and programming languages. 
An example of custom dedicate application development is creating a Windows Phone 7 application to view open sales orders in Microsoft Dynamics AX.

Report development is the development pattern that creates custom reports and customizes any out of the box reports for the Microsoft Dynamics AX platform. 

Enterprise Portal web application development is the development pattern that creates web applications specifically built on the Microsoft Dynamics AX Enterprise Portal development framework. 
An example of web application development is creating an Enterprise Portal-based employee self-service page to enter time-sheet data. 


Thursday, February 27, 2014

The Table.Field does not have a corresponding parm-method on the AxBC-class

If you add new field in a table and getting "The Table.Field does not have a corresponding parm-method on the AxBC-class" error message, you can run following Job to fix this issue. This job will add corresponding parm-method for newly added field in a table.

static void CreateAxBCParmMethodJob(Args _args)

    axGenerateAxBCClass axGenerateAxBCClass; 

    axGenerateAxBCClass = AxGenerateAxBCClass::newTableId(tablenum(CustTable));
    axGenerateAxBCClass.run(); 
 
}



Happy DAXing !!!!