real solutions for real problems
Welcome to MSDN Blogs Sign in | Join | Help

Unable to validate the AX 2009 Workflow Webservice URL on a Windows Server 2008 R2 x64

We recently came across an issue where AX 2009 Workflow extensions were successfully installed on a system running 64-bit Windows Server 2008 R2, and the workflow virtual directory successfully created under the Default Web Site in IIS 7.5. However when we try to Validate the workflow URL (e.g. http://myworkflowserver:80/MicrosoftDynamicsAXWorkflow50/) in the AX Client (AX 2009 Client -> Administration -> Setup -> Workflow infrastructure configuration wizard) we get the following error:

The request failed with HTTP status 405: Method Not Allowed.
 

As a test to ensure that IIS is able to server a page, we were able to manually browse and view the AXWorkItem.asmx file (http://myworkflowserver:80/MicrosoftDynamicsAXWorkflow50/AxWorkItem.asmx). 

We verified that the AOS Service account had NTFS file security access to the Workflow web files and folders (These were installed under "C:\Program Files\Microsoft Dynamics AX\50\Workflow")

We verified that the MicrosoftDynamicsAXWorkflow50 application pool identity was indeed set to run as the Business Connector Proxy User account (as specified in AX 2009 Client -> Administration -> Setup -> Security -> System service accounts)

We verified that the Workflow System and Execution accounts were specified (AX 2009 Client -> Administration -> Setup -> Security -> System service accounts)

 

We resolved the issue by changing the property value of "Enable 32-Bit Applications" from False to True under the "Advanced Settings" for the MicrosoftDynamicsAXWorkflow50 application pool in IIS Manager

Steps:

- Log in as a local administrator on the Windows Server 2008 R2, and run Start -> All Programs -> Administrative Tools -> Internet Information Services (IIS) Manager

- In the left-hand pane, click on Application Pools, and in the right-hand pane select MicrosoftDynamicsAXWorkflow50 application pool

- Click on "Advanced Settings..." in the Task Pane

- In Advanced Settings window, under the "(General) section, change the property value for Enable 32-Bit Applications to True and click on OK

- Now you should be able to successfully validate and use the workflow web services. We get "Workflow runtime URL is valid" displayed in the InfoLog window.

 

 

Posted by EMEAAXTec | 0 Comments
Filed under: ,

How can the Web Proxies get extended programmatically?

When you develop new User Controls for Dynamics AX 2009 Enterprise Portal the Proxy Objects created by Dynamics AX make accessing AOT / X++ resources much easier from within your Visual Studio project.

However not all AOT resources are automatically available as Proxy Objects, but you need to exactly define what AOT elements you want to get Proxy Objects creates for. The MSDN Article Proxies explains what you need to do in detail.

But if you are creating a lot of new AOT elements, manually editing the Proxies list can get annoying. As everything about Proxies is actually available in the AOT, the manual task can get easily automated, e. g. by adding a new Menu Item to the Context Menu of the AOT.

 

First we need to create a new Class in the AOT. I have called the class SysAOTAddWebProxy in this example. The class declaration looks as follows:

class SysAOTAddWebProxy
{

    #AOT

    TreeNode m_proxyNode;
    TextBuffer m_proxyBuffer;
}

 

The default Construtor comes next. Here we load the existing Proxies list from the corresponding AOT node and store it in a TextBuffer object:

void new()
{
    //Get the Proxies node from the AOT
    m_proxyNode = infolog.findNode(#WebStaticFilesProxiesPath);

    //Get the Proxies list from the node
    m_proxyBuffer = new TextBuffer();
    m_proxyBuffer.setText(m_proxyNode.AOTgetSource());

    //For later comparison
    m_proxyBuffer.ignoreCase(true);
    m_proxyBuffer.regularExpressions(false);
}

 

In the Constructor the Proxies list is retrieved, in the SaveProxyList method it is saved back to the corresponding AOT node:

void SaveProxyList()
{
    //Save the changes back to the Proxies node in AOT
    m_proxyNode.AOTsetSource(m_proxyBuffer.getText());
    m_proxyNode.AOTsave();
}

 

The largest part is the adding of the selected Class in the AOT with its methods to the Proxies list. The AddProxyClass method is taking care about this. It is receiving the Class element to be added as parameter in form of a TreeNode object. The method checks if the Class is already part of the Proxies list and if not it is adding the class and all methods:

boolean AddProxyClass(TreeNode tn)
{
    boolean retVal = false;
    TreeNode tnChild;
    ;

    //Does the class already exist in the Proxies list?
    if(false == m_proxyBuffer.find(strFmt('/class:%1', tn.AOTname())))
    {
        //Add the class to the Proxies list
        m_proxyBuffer.appendText(strFmt('\n/class:%1\n', tn.AOTname()));

        //Get the methods of the class
        tnChild = tn.AOTfirstChild();

        while(tnChild)
        {
            //classDeclaraiton is no method, so skip but add the rest
            if(tnChild.AOTname() != 'classDeclaration')
                m_proxyBuffer.appendText(strFmt('    /method:%1.%2\n', tn.AOTname(), tnChild.AOTname()));

            //Next method
            tnChild = tnChild.AOTnextSibling();
        }

        m_proxyBuffer.appendText('\n');
        retVal = true;
    }

    return(retVal);
}

 

As the class should be called from the Context Menu we need to add a static Main method. The Main method is retrieving information for what AOT node the class was called, or in other words what AOT nodes should be added to the Proxies list:

static void Main(Args args)
{
    TreeNode contextNode;
    SysAOTAddWebProxy sysAOTAddWebProxy;
    ;

    //Where we called from the AOT Add-Ins context menu?
    if (SysContextMenu::startedFrom(args))
    {
        //Get the AOT node we were called for
        contextNode = args.parmObject().first();
        sysAOTAddWebProxy = new SysAOTAddWebProxy();

        while (contextNode)
        {
            //What node type were we called for?
            switch( contextNode.applObjectType() )
            {
                case UtilElementType::Class:
                    //Try to add the class to the Proxies list
                    if(true == sysAOTAddWebProxy.AddProxyClass(contextNode))
                        info(strFmt('The class %1 was added to the Proxies list!', contextNode.AOTname()));
                    else
                        warning(strFmt('The class %1 does already exist in the Proxies list!', contextNode.AOTname()));
                    break;

                default:
                    error(strFmt('The AOT element %1 cannot be added to the Proxies list!', contextNode.AOTName()));
                    break;
            }

            //If more nodes were selected in the AOT, get the next node
            contextNode = args.parmObject().next();
        }

        //Save changes back to the Proxies list
        sysAOTAddWebProxy.SaveProxyList();
    }
    else
        error('This class cannot be directly called!');
}

 

This is all about our class SysAOTAddWebProxy.

Now a new Action Menu Item needs to be created pointing to the class SysAOTAddWebProxy, and this Menu Item needs to be added to the existing SysContextMenu Menu. The MSDN Article Adding Items to the AOT Add-Ins Menu contains more detailed information about this step.

 

That’s it. When the class is in place and the Menu Item was added to the SysContextMenu Menu you should now be able to add a Class object selected in the AOT to the Proxies list by clicking with the right mouse button at the Class and selecting “Add-Ins > Your Menu Item text”.

If you want to extend the solution to work also with Tables and Enums you need to add methods similar to AddProxyClass and extend the switch block of the static Main method to call those for UtilElementType::Table and UtilElementType::Enum cases.

How to run a form modal

We wanted to ensure that when using a particular form in AX2009 client no other forms/reports are accessible until the form is closed.

For this we need to make the form a modal form.
We have an example of this in the standard application which can be copied, look at: Classes\SysModalFormDisableAllWkspcs.
This is used to make the Organize favourites form in AX modal (the name of that one is SysFavoritesOrganizeFavorites).

The way we achieve it is by starting the form like this:

...
modalForm.init();
modalForm.run();

If (!modalForm.closed())
modalForm.wait(true);
...
Posted by EMEAAXTec | 0 Comments
Filed under: , , , ,

Workflow error messages “Invalid message sequence”

We often get following error messages concerning workflow:

Dynamics Adapter CallStaticClassMethod failed.
SysWorkflowEventService-onAcknowledgeWorkItem Invalid message sequence - missing Activation message.
Microsoft.Dynamics.BusinessConnectorNet.XppException
at Microsoft.Dynamics.BusinessConnectorNet.Axapta.CallStaticClassMethod(String className, String methodName, Object[] paramList)
at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsAdapter.CallStaticClassMethod(String className, String methodName, Object param1, Object param2)
 

When these occur, none of the workflow items are processed anymore. In Basic –> Inquiries –> Workflow history you can see that all workflow items has status “Pending”

Usually error SysWorkflowEventService-onAcknowledgeWorkItem Invalid message sequence - missing Activation message can mean two problems:

1. Business Connector connect to different AOS.

2. In Workflow configuration you did not create messages in user language.

To resolve first problem:
1. Go to Microsoft Dynamics AX 2009 Configuration

2. Change “configuration target” to “Business Connector (non-interactive use only)”

3. Check on connection tab if there is correct AOS mentioned

By default Workflow during connection to AOS is using active Dynamics AX BC.NET configuration.

To be able to set up different configuration in web.config you need to apply kernel hotfix and follow instruction given in KB 960801: https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb$EN-US$960801&wa=wsignin1.0

If you have hotfix KB 960801 installed and BC.NET still is connecting to wrong AOS please double check in GAC (usually C:\windows\assembly) if library Microsoft.Dynamics.Framework.BusinessConnector.dll and the Microsoft.Dynamics.Framework.Communications.dll has version higher than 5.0.1500.144 for DAX 2009 SP1 and 5.0.593.262 for DAX 2009 RTM

To resolve second problem make sure that you have instructions set up in user language in workflow configuration

Posted by EMEAAXTec | 0 Comments

Error access SSRS reports - System.Web.Configuration.RegexWorker threw an exception

Lately we run into following problem: when navigating to any SSRS report via Enterprise portal or even by the SSRS report manager site, the following error is displayed where the report should appear:

An error has occurred during report processing. (rsProcessingAborted). The type initializer for 'System.Web.Configuration.RegexWorker' threw an exception.



The cause of the issue is that permissions for:

  • for SQL 2005 the account running the IIS application pool for Report Manager (should be bc proxy account)
  • for SQL 2008 the account running SSRS (should be bc proxy account)

are incorrect.
Granting admin rights to the accounts involved and then restarting IIS (or stopping starting the SQL 2008 SSRS process) can quickly prove whether you have a permissions issue. If it works with admin rights then you can remove the admin rights and make sure the accounts have permission to use DLLs in the GAC (typically C:\windows\assembly). You can verify exactly which DLL needs permission by checking the full error log at:

  • C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles for SQL 2005 Reporting Services
  • C:\Program File\Microsoft SQL Server\MSRS10\Reporting Services\LogFiles for SQL 2008 Reporting Services

Error during Hotfix installation - "Version string portion was too short or too long"

Recently we had a problem when installing a Hotfix for AX 2009.
The installation stopped with an error and we could find the following information in the setup log:

=== Starting execution phase ===
Starting the Microsoft Dynamics AX Client executable: C:\Program Files (x86)\Microsoft Dynamics AX\50\Client\bin\ax32.exe "-regconfig=Ax2009myConfig" "-logdir=C:\Documents and Settings\All Users\Application Data\Microsoft\Dynamics AX\Dynamics AX Setup Logs\2009-10-21 12-37-06" "-startupcmd=autorun_C:\Documents and Settings\All Users\Application Data\Microsoft\Dynamics AX\Dynamics AX Setup Logs\2009-10-21 12-37-06\GetVersionInformation.xml"
Exception: System.ArgumentException

Message: Version string portion was too short or too long.

FullText: System.ArgumentException: Version string portion was too short or too long.
at System.Version..ctor(String version)
at Microsoft.Dynamics.Setup.InstallApplicationHotfix.ProcessVersionInformation(String logFilename, String versionFilename)
at Microsoft.Dynamics.Setup.InstallApplicationHotfix.FillHotfixUpdateFilesList()
at Microsoft.Dynamics.Setup.MainForm.DependencyValidation()
at Microsoft.Dynamics.Setup.MainForm.PreInstall()
at Microsoft.Dynamics.Setup.MainForm.s250Timer_Tick()

==== Setup encountered an unhandled exception and could not be completed. For details see the previous messages in the log. ===

What was the problem?

The important information was:

FullText: System.ArgumentException: Version string portion was too short or too long.

The AX Hotfix Installer is checking the AX version during the installation to ensure only valid fixes will be installed.
For this it is calling the following method within AX:

ApplicationVersion/BuildNo()

We then found out that this method has been changed so it returns also the build number of our customizations.

static SysBuildNo buildNo()
{
    return ApplicationVersion::applBuildNo() + MyCustomization.myBuildNo();
}

The result of this change was that the method returned a string that was not expected by the AX Hotfix Installer and the Installer stopped with an error message.
We could finally solve the problem by removing the additional code.

static SysBuildNo buildNo()
{
    return ApplicationVersion::applBuildNo();
}
Posted by EMEAAXTec | 0 Comments
Filed under: ,

How does the AX Hotfix / Service Pack installer detect existing AOS instances

Have you ever wondered how the AX Hotfix / Service Pack installer detects existing AOS instances?

These information can be found in the Installer Registry under the following Registry Key:

HKEY_CLASSES_ROOT\Installer\Products

Every AOS Instance has it's own class Id.
This class id looks like this FA15D12F8BB2D1C4282780DBCF31Axxx (where xxx is a uniqe number).

For example:
If I have 2 AOS instances on my machine then I may find the following registry keys:

HKEY_CLASSES_ROOT\Installer\Products\FA15D12F8BB2D1C4282780DBCF31A110
HKEY_CLASSES_ROOT\Installer\Products\FA15D12F8BB2D1C4282780DBCF31A120

Additional information
If those keys have a subkey named Patches then they are marked as updated.
The entries in this subkey contain information about the applied patches.

Posted by EMEAAXTec | 2 Comments
Filed under: ,

Workflow - user abc has no access to menu item PurchReqTable

Lately for one of the user I run into following problem with Purchase approval workflow. During Workflow process assignment customer get error and Workflow is stopped. We get following error:

"User abc has no access to menu item PurchReqTable.” where abc is user to who workflow item should be assign

The root cause of this behavior was of course connected with user permissions. User had too low permission to be able to assign to needed task item. It happens that user was missing permission: Accounts payable -> Miscellaneous
First of all when you assign the permission to Workflow on permission form you should change Viewing from "Security" to "Workflow", then you are able to assign needed permission for selected Workflow. Although when you assign all permission for Accounts payable -> Purchase requisition -> Project purchase requisition approval you still get the same error. I found that menu item PurchReqTable in \ AOT \ Menu items \ Display \ PurchReqTable and I found out that security key assign to this menu item is: VendMisc So in Security view you need to assign user permission Accounts payable -> Miscellaneous
Posted by EMEAAXTec | 0 Comments
Filed under: ,

Query execution failed for data set 'Company'

Recently we were having problems to get the Role Center up and running. Report Server is setup and working in a correct way. Most reports can be generated, but a few does not answer correct. For those report the following error is generated: “Query execution failed for data set 'Company'” Reports in Role Center can not be accessed. Even those that default company was set in Business Connector Configuration Utility and on the connection tab correct AOS was set up we were still not able to make report working.
The root cause of this problem was that cubes in OLAP database DynamicsAX were not processed.
To solve the problem we were following WhitePapers which let us configure cubes and Role Center:

  1. The “Configure the Default OLAP Cubes” white paper and the cross-reference document are now available here: http://www.microsoft.com/downloads/details.aspx?FamilyId=28CDB057-416A-497E-A7E0-8D52C4EB1BFB&displaylang=en
  2. Microsoft Dynamics AX 2009 White Paper: Configuring Kerberos Authentication with Role Centers: http://www.microsoft.com/downloads/details.aspx?FamilyID=be720eb3-649a-49ff-b019-a1e4e7af6b47&DisplayLang=en
  3. Microsoft Dynamics AX 2009 White Paper: Configuring Enterprise Portal and Role Centers with SQL Reporting http://www.microsoft.com/downloads/details.aspx?FamilyID=3D2463FC-EA13-40EF-A375-2DA2F379652C&displaylang=en
  4. Fixing Microsoft Dynamics AX Cube Processing Errors Caused by EDT Field Changes: https://mbs.microsoft.com/partnersource/documentation/whitepapers/AX2009_FixCubeProcessingErrors

The way how we troubleshoot the problem was following. We had problem with report ProjUtilizationEffeciencyEmpl.

Report ProjUtilizationEffeciencyEmpl is based on Project Accounting Cube.

If Company data set cannot be processed it seems there is something wrong with this cube. Company data set is called with following query:

WITH
MEMBER [Measures].[ParameterCaption] AS '[Company].[Company accounts].CURRENTMEMBER.MEMBER_CAPTION'
MEMBER [Measures].[ParameterValue] AS '[Company].[Company accounts].CURRENTMEMBER.UNIQUENAME'
MEMBER [Measures].[Key] AS '[Company].[Company accounts].CURRENTMEMBER.Properties("Key")'
SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[Key] } ON COLUMNS , Except([Company].[Company accounts].MEMBERS, {[Company].[Company accounts].[All], [Company].[Company accounts].[Unknown]})
ON ROWS FROM [Project Accounting Cube]

Using the DLLFunction kernel class on a 64bit Dynamics AX 2009 AOS

One of the nice features added with Dynamics AX 2009 is the support for 64bit (x64) for the Dynamics AX 2009 Application Object Server and the Dynamics AX 2009 .NET Business Connector.

However when you have some existing X++ that you are now migrating to Dynamics AX 2009, you might run into an issue when you are using the DLLFunction kernel class and try to execute the code on a 64bit AOS.

When you are trying to use the DLLFunction kernel class on a 64bit AOS the execution of the method call will result in the following error message:

Function 'FunctionName' in DLL library ‘DLLName' has caused an exception.

When you are executing exactly the same code on a 32bit AOS, the execution will work (assuming the parameters of the DLLFunction were set correctly).

Background of this issue is, that on 64bit the DLLFunction kernel class itself is not implemented in Dynamics AX 2009.

If you are in a situation where you need to make a call to an external WinAPI DLL, you need to look for alternatives:

  1. Can the call to the external DLL moved to the Client tier? As the Dynamics AX 2009 Client is still 32bit, the DLLFunction kernel class is here existing as it was in the past.
     
  2. Does there exist an equivalent of the WinAPI DLL? If the WinAPI DLL is used to communicate with an external component maybe different communication interfaces exist, like COM Components or .NET Assemblies. Those can still be used.
     
  3. Can a .NET wrapper Assembly be created? If no existing equivalent .NET Assembly is available you might be able to create yourself a wrapper you can reference in Dynamics AX 2009. Inside the wrapper you can simply pass on the calls to the WinAPI DLL. For more information see Consuming Unmanaged DLL Functions and Platform Invoke Tutorial.
     
Posted by EMEAAXTec | 0 Comments
Filed under: , , ,

The Dynamics AX Client sometimes terminates when displaying certain HTML pages in a Web browser control

In Dynamics AX 2009 several Forms exists that have a Web browser control to display either dynamically created HTML content or show certain web pages based on the context of a selected record in a Grid. The Web browser control enriches the user experience this way.

However sometimes it might happen when you open such a Form or change the record context so a different HTML page gets displayed the Dynamics AX client terminates. If the Dynamics AX Client terminates or not mainly depends what kind of content is being displayed in the Web browser control.

HTML pages do often also host interactive objects to enrich their user experience. If on such a HTML page SilverLight content is embedded, event if it is just for advertisements, exactly the described issue will happen. Background of this issue is the misinterpretation of a WM_USER Windows Message by the Dynamics AX Client.

Fortunately this issue was recently solved with the Kernel Hotfix KB968840 that is also included in the Rollup 2.

Posted by EMEAAXTec | 0 Comments
Filed under: , , ,

List of fixes that improve performance of certain features in Dynamics AX 2009

Over the last month different fixes for Dynamics AX 2009 and Dynamics AX 2009 Service Pack 1 were release to optimize specific functionality and features that were not showing an optimal performance in all situations. Most of the fixes were released as Application fixes, which means they either need to be installed individually one by one or by integrating a whole Rollup.

Below you find a list of fixes that were released for Dynamics AX 2009 and Dynamics AX 2009 Service Pack 1 together with an indication in which Rollup they are included. However please be aware that the following list is not complete.

If you are not finding in this list what you a looking for, a search in the Knowledge Base is definitely a good idea!

Issue Fix type Fix included in
KB974830 - You experience slow performance when you try to start the Microsoft Dynamics AX 4.0 client in a closed network or in a perimeter network KB Fix  
KB959598 - Microsoft Dynamics AX stops responding if many clients are opened or closed at the same time in Microsoft Dynamics AX 2009 Application RTM RU-1
SP1 RU-1
KB956422 - You experience slow performance when you select a transaction in the "Account transactions" dialog box in Microsoft Dynamics AX 2009 Application RTM RU-1
SP1 RU-1
KB956338 - You experience slow performance when you export a whole layer in Microsoft Dynamics AX 2009 Hybrid RTM RU-1
SP1 RU-1
KB957436 - You experience slow performance when you create a journal that contains many journal lines in Microsoft Dynamics AX 2009 Application RTM RU-1
SP1
KB967851 - You experience slow performance when you change general ledger journals in Microsoft Dynamics AX 2009 KB Fix  
KB967203 - You experience slow performance when you post inventory journals that contain many positions in Microsoft Dynamics AX 2009 Application RTM RU-1
SP1 RU-1
KB967799 - You experience slow performance or Microsoft Dynamics AX crashes when you print the BOMConsistOf report to a PDF file in Microsoft Dynamics AX 2009 with Service Pack 1 Application SP1 RU-1
KB971155 - You experience slow performance when you set the setup name to "Return order" in the "Arrival overview" dialog box in Microsoft Dynamics AX 2009 Application SP1 RU-2
KB973493 - You experience slow performance when you try to view the Totals information or the Sales Tax information of a sales order in Microsoft Dynamics AX 2009 KB Fix  
KB968397 - A delay occurs unexpectedly when you browse the smmBusRelTable table in Application object tree (AOT) in Microsoft Dynamics AX 2009 Hybrid RTM RU-2
SP1 RU-2
KB972404 - Microsoft Dynamics AX 2009 Service Pack 1 creates an SQL query that causes a slow performance issue for ad hoc reports when you update a report model Application SP1 RU-3
KB972964 - You experience slow performance when you delete a record from certain tables in Microsoft Dynamics AX 2009 with Service Pack 1 installed Kernel SP1 RU-3
KB974706 - You experience slow performance when you open the DirPartyTable form in Microsoft Dynamics AX 2009 Application SP1 RU-3
KB975088 - You experience slow performance when you open the "Print management setup" form in Microsoft Dynamics AX 2009 Application SP1 RU-3
KB974351 - You experience slow performance when you type a search text to look up records in the "Item number" field in a sales order line in Microsoft Dynamics AX 2009 Kernel RTM RU-3
SP1 RU-3
KB973439 - The workflow keeps retrying when a time-out exception error occurs in Microsoft Dynamics AX 2009 with Service Pack 1 installed Application SP1 RU-3
Performance issue in "Open Transaction Edit" form SE BLOG  
Posted by EMEAAXTec | 0 Comments
Filed under: ,

Renaming an AOT object in Dynamics AX 2009 that is under source control with Team Foundation Server

With the support of version control systems (VCS) in Dynamics AX 4.0 and the integration in the AOT a lot of effort was put into the product to make the development in teams more efficient and reduce the chance of conflicts. Dynamics AX 2009 continues this effort with the support of additional version control systems like Microsoft Team Foundation Server (TFS).

The adding of objects in the AOT to source control is straight forward as well as the checking in and checking out. When you are however trying to rename an object that is under source control you might get some unexpected effects if you are using Team Foundation Server as your VCS; actually it’s not you, but the other developers in your team that experience the unexpected effects.

So lets imagine you have an AOT object, e. g. a class object ClassA, that is under source control and in a checked out state. You are a developer and decide to rename the class to ClassB and do a check in. When now a different developer in your team that has already ClassA existing decides to retrieve the latest changes from your VCS (do a synchronization), the developer will get confronted with an error message that another object with the same id already exists and the existing object ClassA isn't renamed to ClassB.

The root cause of the issue is that the object was in a checked out state when it was renamed and later checked in. When you do a rename of an AOT object that is under source control the object has to be in a checked in state when you do the rename (see also: How to: Rename AOT Objects in the Version Control System)!

On the other hand Dynamics AX 2009 should not run into this error state and therefore the Hotfix KB972037 was released to prevent this issue from happening in the future.

Please go to the Microsoft Dynamics AX 2009 SDK on MSDN if you want to know more about using a VCS in Dynamics AX 2009.

Posted by EMEAAXTec | 0 Comments

Debugging non-interactive X++ code in Dynamics AX 2009 when running on Windows Server 2008

The most common scenario for a Dynamics AX developer is that you create your X++ code and objects in the Dynamics AX Client and test them in the same interactive session. In other words you start executing your new code from within the Dynamics AX Client and if necessary debug the code by putting in some breakpoints and wait for the Dynamics AX Debugger to hit them.

There are however also scenarios where the code you have developed needs to be executed in a non-interactive session, and with the release of Dynamics AX 2009 the chances to get confronted with this are much higher because the concept of Batch Jobs has changed.

Unlike earlier versions of Dynamics AX you don’t need to have in Dynamics AX 2009 a Batch Client running any more, as the AOS is now responsible for executing Batch Jobs (that support the new Batch Framework).

The important part is that the X++ code of the Server Batch Jobs is executed on the AOS in a non-interact session, and this changes also the way how you need to debug the X++ code.

The easiest way is still trying to avoid the non-interactive part, in other words trying to execute the code running in the non-interactive session in an interactive session by creating some helper/wrapper classes and calling them from the Dynamics AX Client. However sometimes the error you are facing does only occur in the non-interactive session.

You can still instrument your code (build in some logging) and evaluate the output (log), however still you can reach a point where you have no other choice than debugging the code in the non-interactive session. For those of us that have developed Enterprise Portal Web Forms in the past the concept is very similar, as here you are also dealing with a non-interactive session.

In order to do non-interactive debugging, you need to prepare your environment and make some configuration changes. I don’t want to go into too much detail what you have to do, as I found some excellent posts and just want to refer to them instead:

Once you have set up everything correctly, you might however face the issue that the Dynamics AX 2009 Debugger does not stop at your breakpoint.

This is the case when either the AOS for Server Batch Jobs or the .NET Business Connector for Enterprise Portal are running on Windows Server 2008. In this environment the Dynamics AX 2009 Debugger will never connect to your non-interactive session and so never hit any breakpoint!

There was recently the Hotfix KB962952 released for Dynamics AX 2009 SP1 that addresses this issue. If you want to debug X++ code in a non-interactive session in Dynamics AX 2009 and you are running on Windows Server 2008 you need to install this Hotfix!

Once the Dynamics AX 2009 Debugger is attached to your non-interactive session the experience you get is the same as if you would debug interactive sessions.

Posted by EMEAAXTec | 0 Comments

Unable to install Dynamics AX 2009 Analysis extensions when the default SQL Server Analysis Server collation is set to Turkish_CI_AS or Turkish_CS_AS

We came across an issue where by after installing the Dynamics AX 2009 Analysis Extensions sucessfully, no database is created! Even if you manually try to create the Dynamics AX Analysis database from the analysis script file DynamicsAX.xmla (found under the installation media in "\support\Analysis Services\Scripts\" folder), you get the following error message:

<BR><return xmlns="urn:schemas-microsoft-com:xml-analysis">
  <results xmlns="http://schemas.microsoft.com/analysisservices/2003/xmla-multipleresults">
    <root xmlns="urn:schemas-microsoft-com:xml-analysis:empty">
      <Exception xmlns="urn:schemas-microsoft-com:xml-analysis:exception" />
      <Messages xmlns="urn:schemas-microsoft-com:xml-analysis:exception">
        <Error ErrorCode="3239313662" Description="Errors in the metadata manager. The attribute with ID of ''''Description'''', Name '''''''' of referenced by the '''''''' cube dimension, does not exist." Source="Microsoft SQL Server 2008 Analysis Services" HelpFile="" />
      </Messages>
    </root>
    <root xmlns="urn:schemas-microsoft-com:xml-analysis:empty">
      <Exception xmlns="urn:schemas-microsoft-com:xml-analysis:exception" />
      <Messages xmlns="urn:schemas-microsoft-com:xml-analysis:exception">
        <Error ErrorCode="3239313412" Description="Errors in the metadata manager. Either the database with the ID of ''''Dynamics AX'''' does not exist in the server with the ID of ''''ANUP209'''', or the user does not have permissions to access the object." Source="Microsoft SQL Server 2008 Analysis Services" HelpFile="" />
      </Messages>
    </root>
  </results>
</return>

We got this issue on a SQL Server Analysis Server (SSAS) 2008 where the default collation was set to Turkish_CI_AS. The same will apply if you were running SQL Server 2005 and also with Turkish_CS_AS collation. This is by design as the Analysis extensions (OLAP framework tools and Default Cubes) have been tested only in the following AX language/collation combinations:


Language     SSAS Collation
English US   Latin1_General_CI_AS 
Danish         Danish default collation 
German       German default collation 
Chinese       Chinese default collation 
Arabic          Arabic default collation


You maybe able to workaround the issue as follows:

- In SQL Server Management Studio, connnect to SSAS and right click on the server name to change the properties of collation .
- Set your collation to Latin1_General for instance and restart SSAS
- Run the AX setup to add the "Analysis extensions".
- When the DynamicsAX database and its cubes have been created, you could either change back SSAS collation to Turkish_Cx_Ax, or first backup the database, then change SSAS collation to Turkish_Cx_Ax and restore the backup.



More Posts Next page »
 
Page view tracker