Friday, April 29, 2011

AX 2012 Pre Release Installation

Following is the Procedure for AX 2012 Installation :-

Setup Prerequistes :-

  • Windows Server 2008 R2 with One Domain Configured
  • SQL Server 2008 (SP2 Optional )
  • Sharepoint Centeral Administration Site (Sharepoint 2010)
  • Microsoft Office 2010 (For Office Add ins)

1) Run Setup.exe

2) Click on Install (Microsoft Dynamics AX Components)

3) Click next on the Welcome page

4) Click on "I Accept the licence terms "

5) Choose you Option

6) Select your Update Choice


7) Application File Location


8) Click on Install


9)

10) Choose Your Installation Type (In this Demo I used Single Computer Installation)


11)
12) Check All Configure CheckBoxes

13)
14)
15)
16) 17) If some errors occurs (Click on the Link under Download Column
Download & Install the Update )


18) Type your AOS Service Account Details (You should use the Dedicated account)

In this Installation we are using the Administrator Account.


19)
20) Type your Business Connector Proxy Account Details

21)
22) 23)

Monday, April 25, 2011

Data Tracking in AX 2009


How to track records and restore data if by mistaken delete in AX 2009
  • Open Dynamics AX
  •   Go to Administration Module -> Setup -> Database Log
  • Create New-> Next -> Select All Company Accounts -> Next -> Choose Tables to Track
  • Select the Type of Events you want to Track -> Next -> Close
  • Go to Administration -> Setup -> Life Science Electronic Signature Audit Trail
  • Create New audit trailà Select the Table which you want in Audit trailà Save and close the form.
  • Enter the data in the module as per the setting did in the administration module
For Cross Check
  •       Click Administration ModuleàInquiries à Database Logà Here user can See the changes, or Reinsert the data which is by mistaken deleted.  



Friday, April 22, 2011

Restoring delete sales order or purchase order in AX 2009

Many people know that when a sales order or purchase order is deleted, it is actually not purged from system like lot of other data but sits in the voided tables. These orders can be viewed from AR -> Inquiries -> History -> Voided sales order or AP -> Inquiries -> History -> Voided Purchase order.

Now from this form you can only view the deleted orders but there is not option of restoring them.

Below are some sample code that can be used to restore the voided orders.

Sales order restoration:

static void restoreDeletedSO(Args _args)
{
    SalesTableDelete    salesTableDelete;
    SalesLineDelete     salesLineDelete;
    SalesTable          salesTable;
    SalesLine           salesLine;
    ;
    SalesTableDelete = SalesTableDelete::find('00450_036', true);
    ttsbegin;
    switch (salesTableDelete.Cancelled)
    {
        case Voided::Voided :
            salesTable  = conpeek(salesTableDelete.SalesTable, 1);
            salesTable.insert();
            while select forupdate salesLineDelete where salesLineDelete.SalesId == salesTableDelete.SalesId
            {
                salesLine = conpeek(salesLineDelete.SalesLine, 1);
                salesLine.insert();
            }
            salesTableDelete.delete();
            break;
        case Voided::linesVoided :
            while select forupdate salesLineDelete where salesLineDelete.SalesId == salesTableDelete.SalesId
            {
                salesLine = conpeek(salesLineDelete.SalesLine, 1);
                salesLine.insert();
                salesLineDelete.delete();
            }
            salesTableDelete.delete();
            break;
   }
   ttscommit;
}
Purchase order restoration:
static void restoreDeletedPO(Args _args)
{
    PurchTableDelete    purchTableDelete;
    PurchLineDelete     purchLineDelete;
    PurchTable          purchTable;
    PurchLine           purchLine;
    ;
    purchTableDelete = PurchTableDelete::find('00242_049', true);
    ttsbegin;
    switch (purchTableDelete.Cancelled)
    {
        case Voided::Voided :
            purchTable  = conpeek(purchTableDelete.PurchTable, 1);
            purchTable.insert();
            while select forupdate purchLineDelete where purchLineDelete.PurchId == purchTableDelete.PurchId
            {
                purchLine = conpeek(purchLineDelete.PurchLine, 1);
                purchLine.insert();
            }
            purchTableDelete.delete();
            break;
        case Voided::linesVoided :
            while select forupdate purchLineDelete where purchLineDelete.PurchId == purchTableDelete.PurchId
            {
                purchLine = conpeek(purchLineDelete.PurchLine, 1);
                purchLine.insert();
                purchLineDelete.delete();
            }
            purchTableDelete.delete();
            break;
   }
   ttscommit;
}

AX Startup Alert

Following is the Demonstration when you want to execute something in AX Startup :-
  • Open AOT
  • Go to Classes -> Info
  • Open the StartupPost() method
  • Type any Code over there
void startupPost()
{
;
//your code goes here
box::info("Welcome to AX 2009");
}

AX 2009 Known Issues & Solutions



Issue:
Error trying to deploy reports
Microsoft Dynamics AX Reporting Project Deployment: The following components have not been installed or are not configured correctly: AL.exe
Solution:
Download and install the Windows SDK for Windows Server 2008 and .NET Framework 3.5  Ensure it is fully installed.
NOTE:  Install regardless of operating system
Issue:
Error trying to deploy reports
System.InvalidOperationException: The following components have not been installed or are not configured correctly: Microsoft Domain-Specific Language Tools
Solution:
Download and install these required components.  Microsoft Visual Studio 2008 Shell (isolated mode) Redistributable Package
1.      Save the download locally
2.      Extract the package
3.      Run the vs_appenvredist.msi
NOTE:  Install regardless of operating system
Issue:
Error trying to deploy reports
Microsoft Dynamics AX Reporting Project Deployment: ClrBridgeLoader: fatal error :
Microsoft.Dynamics.ClrBridge.dll cannot be loaded. Fatal error: ClrBridge is note loaded.
Solution:
Ensure you are trying to deploy reports from the SSRS server and that you can validate the SSRS server name in the Reporting Servers from within Microsoft Dynamics AX 2009.  If this error appears right after installing the reporting extensions, launch the report deployment tool again.
Issue:
Enterprise Portal (EP) or SSRS Reports don’t run or stop working
An attempt has been made to use a data extension 'AXDATAMETHOD' that is not registered for this report server. (rsDataExtensionNotFound)
or
data extension 'AXQUERY' and 'AXADOMD'
Solution:
Installing or Reinstalling Reporting Extensions will resolve this issue.  As a precaution make a Backup of:
Program Files\Microsoft SQL Server\MSSQL.<Instance>\Reporting Services\ReportServer folder
NOTE:  SSRS updates or Service Packs may remove entries from rsreportserver.config file.
Issue:
Enterprise Portal (EP) Reports don’t run or stop working
A ProgressTemplate must be specified on UpdateProgress control with ID 'AxProgressControl'
Solution:
You can resolve the issue by using one of the three methods below:
1.      Apply the hotfix from KB957312 to the RTM version
2.      Upgrade to Dynamics AX 2009 SP1
3.      Un-install Microsoft .NET 3.5 SP1 and reinstall Microsoft .NET 3.5 without SP1
Issue:
Report deployment tool Crashes
Attempted to read or write protected memory.  This is often an indication that the memory is corrupt
Solution:
If multiple versions of Dynamics AX are installed on the same server you will need to change your AX 2009 Path in your environment variables ahead of your AX 4.0 path to avoid running the wrong version of DLL’s
Issue:
Error running reports
Error during processing of 'AX_CompanyName' report parameter. (rsReportParameterProcessingError).
Solution:
Process OLAP the cubes to supply data to the reports
or
An incorrect Execution account has been specified in the Reporting Services Configuration Manager
Note:  For SSRS 2008 the Business Connector proxy account is required to be the SSRS service account and for SSRS 2005 the Business Connector Proxy account should be running as the SSRS application pool in IIS.   Also look at application event log for details on other issues.
Issue:
Enterprise Portal (EP) web site runs but not the reports in the EP web parts:
Dynamics Adapter LogonAs failed 
or
Microsoft.Dynamics.BusinessConnectorNet.LogonFailedException
Solution:
Leave the Execution account blank on SSRS 2005 or set to BC Proxy account on SSRS 2008 (Microsoft Dynamics AX 2009 SP1 only)
NOTE:  SSRS Execution account is set to an account other than BC Proxy Account
Issue:
EP or SSRS Reports don’t run or stop working
Dynamics Adapter LogonAsGuest failed
or
FatalSessionException...
Solution:
The issue is caused by the Reporting Services web site set to anonymous Authentication.  Changing the SSRS website to Integrated and/or un-marking Anonymous Authentication will resolve this issue.
Issue:
Double Hop \ Kerberos Authentication
An Error has occurred while establishing as connection to the Analysis Server
or
Reports don’t display in the EP website from a Client Browser not local to the IIS server
Cannot read information from SQL Server Reporting Services. Validate that the Report Manager URL is correct
Solution:
Setup Service Principle names (SPN) and Delegation to allow the passing of Kerberos certificate
Issue:
Office Data Connection (ODC) file deployment fails with SQL Server 2008 
Microsoft Dynamics AX is searching for the SQL Server 2005 Microsoft.AnalysisServices.dll (v9.0.242.0)
Solution:
Apply one of the following hotfixes:
·         For Microsoft Dynamics AX 2009 RTM:  Apply the fix from KB957312
·         For Microsoft Dynamics AX 2009 SP1:  Apply the fix from KB960158
If the hotfix does not resolve the issue, make sure you are running a Dynamics AX 2009 client on the EP web server when deploying the ODC files.  As a workaround you can manually deploy the ODC files by following these steps:
1.      Click here to download a new ODC file (Dynamics_AX.odc).
2.      Save the ODC on the SSAS server
3.      Open the ODC file with Notepad or any other text editor
4.      Edit the odc file with the following changes:
Data Source=OLAPServerName 
Initial Catalog=OLAPDbName
Add SSPI=Kerberos after Initial Catalog if using Kerbersos (in red only required for Kerberos authentication)


….
<odc:Connection odc:Type="OLEDB">
<odc:ConnectionString>Provider=MSOLAP.3;Integrated Security=SSPI;Persist Security Info=True;
DataSource=<Server1>;Initial Catalog=Dynamics AX;SSPI=Kerberos
</odc:ConnectionString>
5.      Save the changed ODC file.
6.      Go to EP main site.
7.      Click on Site Actions > Site Settings.
8.      Under Galleries, click on Master pages.
9.      Click on View all site content (top left).
10.  Click on Data Connections folder.
11.  Import the edited ODC file.
Issue:
DataSet panel is missing in Report Designer when creating reports in Visual Studio Server 2008
Solution:
For Visual Studio 2008, apply the fix in KB947173
OR
apply Microsoft Visual Studio 2008 Service Pack 1.
Issue:
"Connection forcibly closed by remote host" in Dynamics setup log when trying to create an EP site in AX 2009
Solution:
Download and install the Microsoft Analysis Management Objects:
·         for SQL Server 2005:  Microsoft SQL Server 2005 Management Objects Collection package
·         for SQL Server 2008:  Microsoft Analysis Management Objects package
Issue:
"Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'"
Solution:
Ensure SSRS service is running and are able to connect to instance via SQL Server Management Studio.
Note:  Additional information can be found in SSRS error log.
Issue:
Exception from HRESULT: 0X80041FFF
Solution:
Change Visual Studio project location to local drive if using a network share
Issue:
The Analysis extension is not seeing the SQL cluster name for Analysis Services when Analysis services is setup on a SQL cluster.
You will get an error similar to this when trying to install Analysis Extension in this environment:
Connecting to SQL Server 2005 Analysis Services on server 'SQL02' and instance 'MSOLAP$ANALYSIS'.
A connection cannot be made. Ensure that the server is running.
No connection could be made because the target machine actively refused it 127.0.0.1:2383
An error occurred while Setup was connecting to SQL Server Analysis Services instance 'MSOLAP$ANALYSIS' on server 'SQL02'.

An error occurred while Setup was connecting to SQL Server Analysis Services instance 'MSOLAP$ANALYSIS' on server 'SQL02'.
Solution:
The workaround is to manually run the script to create the Dynamics AX OLAP db from the AX 2009 CD.
Navigate to this folder \support\Analysis Services\Scripts on your AX 2009 installation CD.
Then run the dynamicsax.xmla script from within SQL Management Studio (connected to the SSAS instance).
This script will create the Dynamics AX OLAP database.
Issue:
BC Proxy account fails to start for the SSRS reports in Enterprise Portal with RPC exception 5
When Enterprise Portal starts for the first time and displays SSRS reports, normally two Business Connectors are started. After a period of time or if the impersonated web user logs out for the SSRS Proxy account you may experience an RPC error 5 access denied and the SSRS reports will no longer display in Enterprise Portal.
Example
Error:
Event Type: Error
Event Source: Dynamics .NET Business Connector 5.0
Event Category: None
Event ID: 180
Date: 10/7/2008
Time: 6:21:04 PM
User: N/A
Computer: AX2009
Description:
Microsoft Dynamics AX Business Connector Session 18.

RPC error: RPC exception 5 in Ping occurred in session 36
Solution:
RPC error 5 can occur if the SSRS Execution account is set in the Reporting Services Configuration Manager. If the account used is the Business Connector proxy account the first startup of the Business Connector will work, but not any subsequent startups unless the IIS application pool if recycled or an IIS reset is done.
SSRS 2005
Remove the SSRS execution account through Reporting Services Configuration Manager and ensure the Business Connector account is running the IIS Application Pool for the SSRS web site.
SSRS 2008
Change the SSRS service to start as the Business Connector Proxy account and remove the SSRS execution account through Reporting Services Configuration Manager.
Note:  Changing the SSRS account would require a change in the registered SPN’s if you are using Kerberos authentication

Wednesday, April 20, 2011

Difference between AX, NAV & GP

What is the Difference between Microsoft AX , GP and NAV?


Microsoft Dynamics ERP Products

Every business management software solution in our line of familiar and adaptable enterprise resource planning (ERP) products is simple to use, straightforward to implement, and easy to adapt to your specific business requirements. They fit smoothly with your existing systems and work like and with Microsoft software your people use every day to provide ongoing value and low total cost of ownership.
  • Microsoft Dynamics AX is a comprehensive ERP product that helps midsize and larger organizations operate across multiple sites and countries. With a rich, flexible industry foundation Microsoft Dynamics AX can standardize processes, provide visibility across your business, and help simplify compliance. Learn more about Microsoft Dynamics AX.
  • Microsoft Dynamics GP is a scalable ERP product for growing and midsize organizations that can help you extend insight, productivity, and collaboration across your entire business. Microsoft Dynamics GP offers flexible deployment options to connect financial and operations processes, and provides fast access to relevant information using familiar Microsoft tools. Learn more about Microsoft Dynamics GP.
  • Microsoft Dynamics NAV is an ERP product for midsize organizations that provides proven industry-specific functionality relevant to your needs – even for the most highly specialized industries and business processes. Available in more than 40 country versions, Microsoft Dynamics NAV is fast to implement, easy to configure, and simple to use. Learn more about Microsoft Dynamics NAV.
  • Microsoft Dynamics SL is an ERP product specialized to help project-driven midsize organizations manage people, projects, and profitability. With powerful solutions for professional services, operations, field services, and construction management companies, Microsoft Dynamics SL can help you manage your projects on time and on budget. Learn more about Microsoft Dynamics SL.

AX 2012 Beta Links

Run AX as a different user from Windows Explorer

This is something useful for people who have already switched to Windows Server 2008 or Windows Vista / Windows 7.

As you have probably noticed, the Run as... command is not available in these versions of Windows any longer (it's still available from command line, of course, but that's not as user friendly).

As AX users/developers/etc., we all ofter have to log into AX as a different user, for example to verify security settings for a particular AX role being setup.
Having Run as... command in the context menu really saves time here.

So, Microsoft, namely Mark Russinovich, provided a way to return this useful command back into the standard context menu.

You can download and install ShellRunas from technet.

Now, to install it, simply follow the easy instructions below:
  1. Download and unzip ShellRunas by following the link above
  2. Copy ShellRunas.exe to your Windows\System32 folder
  3. Open a Command Line and run the following command: shellrunas /reg
  4. A message box confirming successfull installation should pop up. Click OK
  5. Now, holding down the SHIFT key, right-click the AX icon. You will see a Run as different user... item in the context menu


To uninstall the Shellrunas utility, simply execute the following command from a command prompt: shellrunas /unreg

Close a Form in AX 2009

Brief description of ways to close a form in AX 


We had this question asked on one of the internal AX forums, and Michael Fruergaard wrote a short description of each method you can use.


Re-posting it here with some extra comments, so that new developers can read and understand, when to use what method.

There are “only” 5 ways to close a form:
  • Close - close the form. Similar to the 'X' button.
  • CloseOK – close the form, and set the OK flag – called by the Commandbutton::Ok
  • CloseCancel – close the form, and set the Cancel flag – called by the Commandbutton::Cancel
  • CloseSelectRecord – close the lookup form, and set return record
  • CloseSelect – close the lookup form, and set return value

The below methods (note their names are in past-tense) are used to determine if or how a form was closed:
  • Closed – Returns true, if the form is no longer open
  • ClosedOK – Return true, if the form was closed by the user clicking ‘OK’
  • ClosedCancel – Returns true, if the form was closed by the user clicking ‘Cancel’

Finally, CanClose() is called before any of the close methods get called. If CanClose() returns false, the form is not allowed to close.