Wednesday, July 8, 2015

DIXF shared directory access validation error "Access is denied for the user"

While validating the service account access to DIXF shared working directory the error "Access is denied for the user" will be shown.

Solution:
1. Check the security of the file folder
2. Add the AOS Service account to the local DIXF Group,
3. Restart AOS, the validation of DIXF-Parameters will work fine.

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!!