Ax32.exe crash (Ax Client has stopped working)

Post Ax2012 R3 or Ax 2012 R2 installation and configuration, there have been several times that our application crashes when we try to open the Ax application.

Screenshot:

Following is a screenshot of the error.

Featured image

To resolve the issue follow the steps mentioned below:

1.  Open cmd.exe and open the command line as an administrator. The reason      we face this error is because of the temporary .auc files that are created      automatically, every time the application is opened by the user.

2. Run the @echo off command. This command turns the command line echo     command off. This runs the .bat file to cleanup the temporary .auc files.

Featured image

This will cleanup all the .auc files under <%SystemDrive%>\Users\<username>\AppData\Local. The following are the .AUC files that is created whenever an AX user opens the Ax2012 R3/R2 application.

Featured image

Advertisements

Setup Enterprise Search in Microsoft Dynamics Ax 2012

Enterprise Search provides a robust search engine across all data registered with the service. End users can search for a bunch of information from Microsoft Dynamics Ax Client or Microsoft Dynamics Ax 2012 Enterprise portal. This feature replaces the global search feature of Ax2009.

Here Enterprise Search is configured and setup, based on the following line of pre-requisite components.

  • Operating System    –      Windows Server 2012 R2
  • Database                   –      Microsoft SQL Server 2014 Enterprise Edition
  • Portal                         –      Microsoft SharePoint 2013 Enterprise Edition
  • Ax Version                 –     Microsoft Dynamics Ax2012 R3 with Enterprise Portal                                                installed and configured with Cumulative Update 8

Note:   Here Ax2012 Enterprise Portal must be installed and configured successfully.

1.    The first step is to install Enterprise Search in Microsoft Dynamics Ax2012.

Featured image

         Ensure that the SharePoint Server Search service startup type service is started.          Ensure the service is configured.

Featured image

         Once the SharePoint Server Search service is configured, the following message          will be displayed. The Business Data Connectivity service application is          a centralized infrastructure that enables SharePoint search for information that          do not reside within SharePoint.

Featured image

           Ensure, that the Business connector proxy and the search crawler account are            set and enabled.

Featured image             The search crawler account needs to be setup and configured as shown below.

Featured image

               Choose the SharePoint Web Application from the drop-down showcased               below to ensure that the search runs on top of the selected Web Application.

Featured image

               After choosing the web application, the next step is to complete the                 pre-requisite check.

Featured image

 

 

 

2.         The next step is to create the users and ensure that the user is assigned the             Search Crawler security role.

Featured image

 

 

 

 

 

Resolving unhandled exception error while creating a web module in Ax 2009/Ax2012 Enterprise Portal

While creating your first page or while creating a custom web page in Microsoft Dynamics Ax 2012 or Microsoft Dynamics Ax 2009 Enterprise Portal , the un-handled exception error pops-up very often. A screenshot of the error is mentioned below.

Featured image

Resolution:

1.   This issue arises because the debugging option is disabled in the web.config file.       This is an issue which we commonly face while developing ASP.NET applications.

2.    Irrespective of whether the Enterprise Portal site collection is hosted on port 80        or a non-port 80 site, the web.config file is generated for every website that is        hosted on the Internet Information Services (IIS) Web server role of Windows        Server 2012/Windows Server 2012 R2/Windows Server 2008 R2/Windows Server        2008.

       Ensure that the debug property on the tag is set to true in the web.config file.        This will resolve the problem of unhandled exception.

Featured image

 

         The default location for a web.config file is: <%systemdrive%>\inetpub\wwwroot\wss\VirtualDirectories\\web.config

     Featured image

Resolving “Error in URL property error”

A lot of times as an Enterprise Portal developer, i have faced this problem of URL property error. This is a problem that persisted in Microsoft Dynamics Ax 2009 and in Ax2012.

When we hit the ellipses button while setting the URL for a URL Menu Item, the Ax application fails to open the Enterprise Portal website folders through which we add a URL to the Enterprise Portal .aspx pages. The error is as showcased in the screenshot below.

Featured image                      Featured image

 

Resolution:

1.    To resolve the above mentioned issue, download the hotfix through the link        mentioned below.
 http://support.microsoft.com/kb/907306

Featured image

2. Install the package and try to navigate to the web folders. It will show the browse     web folders window. On hitting the ellipses button, one should get the Browse for     Files or Folders window to navigate to the .aspx pages that represent the     Enterprise Portal web pages.

Featured image     Featured image

 

 

 

 

 

Fetching Embedded resources in Microsoft Dynamics Ax 2012

Often there are questions regarding the location of embedded images within the Microsoft Dynamics Ax Rich Client.
For example, let’s say i want to assign a image from the base application then the priority is to use the images available in the base Ax 2012 application.

In Ax2012, these embedded resources are stored inside a table called SysImageResources.

Featured imageOpen the AOT  and navigate to the SysImageResources form. The SysImageResources are generated on the table through the class Image and the macro MaxNumofResources. the class image validates the maximum number of resources based on which the four columns are generated.

Featured image

In the init() method, in the SysImageResources form, the following line of code

  • Resource Id
  • Image
  • Transparent Image
  • Image Type

Open the SysImageResources form and this will open up the images in the format shown below.

Featured image

Check the Resource Id before adding it to the form design.

Organizational Level Relationships

Just came across this question on how the organizational level relationships work in Microsoft Dynamics Ax 2012 R2/R3 from a tabular standpoint. The Organizational level relationship in Ax2012 has changed and it touch bases the following set of tables.

  • OMOperatingUnit    (Base table that captures operating units details)
  • OMInternalOrganization   (Base table for each of the organizations)
  • DirPartyTable   (Contains details of the organization and the people)
  • DirPartyRelationship  (Relationship between different parties)
  • DirRelationshipTypeTable (Master table that holds relationship types used to define the relationships between parties)
  • CompanyInfo  (Contains company details as a whole)

Create a Custom Proxy Project in Microsoft Dynamics Ax Enterprise Portal

In most of the developmentn environments that i have seen till date, Enterprise Portal developers prefer re-using the system created proxy projects. Instead, it is better to use custom proxy projects because at times, while migrating code from one environment to another, these system proxy projects are often disrupted.

Create a Custom Proxy Project for Enterprise Portal Development:

1.    The first step is to ensure that Visual Studio 2013/Visual Studio 2010 tools are        installed for Microsoft Dynamics Ax 2012 R2/R3.
Note:

  • Visual Studio 2010 is not supported with Microsoft Dynamics Ax 2012 R3 Cumulative update 8 and Visual Studio 2013 is not supported with Microsoft Dynamics Ax2012 R2.
  • Visual Studio 2013 Update 2 is required to setup Visual Studio 2013 tools for Microsoft Dynamics Ax 2012 R3.
  • Pre-Cumulative 8 update build of Microsoft Dynamics Ax 2012 R3 supports Reports, .NET development and Enterprise Portal development on Visual Studio 2010.
  • ReportViewer 2012 runtime component is required, if Visual Studio 2013 tools are to be installed.

For further details regarding compatibility of Visual Studio 2013 with Microsoft          Dynamics Ax 2012 R3, please refer to the link mentioned below.

https://mbs.microsoft.com/customersource/northamerica/AX/downloads/updates/ msdaxvistudiotolls2013

2.     The next step is to create a normal Visual C# project. In this case, i have chosen a         Windows Form application.

Featured image

Featured image

Featured image

In the next step, add the project to the AOT as shown below.

Featured image           This will convert the C# project into a Microsoft Dynamics Ax Visual C#            projects thereby enabling a developer to access the MorphX Framework.

Featured image

3.      Now, to ensure that the Deploy to EP property is set to Proxies, to ensure that          this project is available as a proxy project in the Enterprise Portal project. This          will ensure that the project output is deployed to the Enterprise Portal site          collection in the SharePoint Web Application.

Featured image

4.      The next step is to create an Enterprise Portal Web Application project and after          creating the Enterprise Portal Project, try to add the EP proxy project that was          created in the previous step.

Featured image

Featured image

The custom proxy project that we created will now appear in the list of             Enterprise Portal proxy projects.

Featured image

Select the proxy project to the Enterprise Portal solution. Through this proxy             project developers can access the MorphX framework objects.

In my next post, i will explain how to add MorphX objects to the proxy project and expose those objects for Enterprise Portal development.