Monday, March 9, 2015

"Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics"- error while import .xpo in ax 2012

The below error will come when you try to import and compare the objects from .XPO.

"Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics"

Solution: Full CIL will resolves the error.

If full CIL does not solves the issue then follow the below steps.

1. Stop the AOS. 
2. Delete the *.pdb and *.netmodule files
3. Start AOS and do full CIL.

Friday, January 23, 2015

"The given key was not present in the dictionary" Error while loading EP page

While loading the EP page the below error will be shown.

An unhandled error has occurred. To view details about this error, enable debugging in the web.config file or view the Windows event logs.

The given key was not present in the dictionary.

mscorlib

   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.ObjectModel.KeyedCollection`2.get_Item(TKey key)
   at Microsoft.Dynamics.Framework.Collections.NameIdReferenceCollection`1.GetByName(String name)
   at Microsoft.Dynamics.AX.Framework.Portal.Data.DataSetView.AddFieldToSelectionList(DataSourceDataFieldMetadata displayedField, String referenceFieldGroupName, Boolean skipResolvingTheField)
   at Microsoft.Dynamics.Framework.Portal.UI.WebControls.ControlsCommonFunctionality.GetAndEnsureDataKeys(DataSetView dataSetView)
   at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxForm.EnsureAllBoundFields()
   at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxForm.OnPagePreLoad(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Web.UI.Page.OnPreLoad(EventArgs e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

The root cause for this issue is missing Super() method in DataSet.init() method.



Thursday, April 24, 2014

Excel download and open error from portal

Once we download excel file from portal and try to open file the below error will be shown.

The code used for the download is as follows.
HttpContext.Current.Response.TransmitFile(filepath);
System.IO.File.Delete(filepath);
HttpContext.Current.Response.End();

Here the issue comes because the file will be deleted immediately once the file transmitted. During this time the original file will be locked by other process.

So changing the code as below will resolves the issue.

HttpContext.Current.Response.TransmitFile(filepath);
HttpContext.Current.Response.Flush();
System.IO.File.Delete(filepath);
HttpContext.Current.Response.End();


Saturday, September 28, 2013

Error in Batch Job: Stack trace: Invalid attempt to call WinAPI.fileSize running in CIL on the client.

Batch Job end with error in Log as follows..

Stack trace: Invalid attempt to call WinAPI.fileSize running in CIL on the client.

The reason for this error is WINAPI in DocuActionArchive.add() method. Which will not work in batch job.

To solve this modify the method by using System.IO namespace classes as below..

fileInfo   = new System.IO.FileInfo(attachFileName);
fileSize = fileInfo.get_Length();

This will solve the issue and Batch will work without errors

Saturday, September 7, 2013

A generic error occurred in gdi+ (C#.Net - while saving image to a file from image control)

This error will be thrown if there is no write permissions to the folder to which the file will be saved.

Sol: Grant the write permissions to the folder. It will solve the issue

Monday, July 1, 2013

Passing a parameter value from ListPage:MenuItemButton control to a form in Ax 2012 list page


To pass a parameter value from ListPage:MenuItemButton control to a form in Ax 2012 list page below are the steps..

1. For the MenuItemButton control set the AutoDeclaration property "True"

2. In list page interaction class override the SelectionChanged() method. Add the code to pass parameter value as string. For example:

    this.listPage().actionPaneControlParameters(formControlStr(ListPage Name,MenuItemButton Control Name),"Parameter Value");


2. Now override the init() of the child form which is out put of MenuItemButton. Add the following code to retrieve the same..
   
   info(element.args().parm());

Happy DAXing!!

Tuesday, May 14, 2013

Mobile Solutions for Microsoft Dynamics AX

MOBILE SOLUTIONS FOR MICROSOFT DYNAMICS AX

Dynamics Anywhere offers a suite of powerful yet easy to use mobile solutions that support various business processes. The following solutions are available:

AX Anywhere - Logistics
A solution offering mobile processes to support your warehouse operations
AX Anywhere - Retail
A solution covering the mobile processes related to inventory management in a retail outlet
AX Anywhere - Sales
A mobile solution that supports field sales or counter sales processes with an order
AX Anywhere - Production Control
A solution that covers the mobile processes related to manufacturing companies production process
AX Anywhere - iPad Field Sales
An offline mobile sales solution that offers sales representatives access to customer and order information

The Dynamics Anywhere mobile solutions for Microsoft Dynamics AX have properties that make our solutions really unique:

Fully integrated in Dynamics AX
This assures you that our mobile solutions will work perfectly within your existing Microsoft Dynamics environment. In addition, your current ERP partner can do the implementation and support.
Completely based on Microsoft technology
Our mobile solutions are based on familiar Microsoft products like Windows Server and IIS and do not use any (3rd party) middleware. This makes implementation and support easy.
Extremely flexible
Each solution can be tailored to your specific needs with a range of available settings in Dynamics. And if necessary, it is also possible to enhance or modify our solutions in the same way as you can modify your Dynamics processes; simply by adding or changing the business logic of Dynamics itself.
Device independent
The Dynamics Anywhere solutions run on virtually any device with a browser, including tablets, rugged mobile terminals and smartphones. This offers freedom of choice and cost savings in supporting a mobile infrastructure remotely

For more information see http://www.dynamicsanywhere.com