Doens.be

  • Linkedin flickr twitter delicious Facebook Youtube

Microsoft Dynamics Ax – Technical conference 2011 (Redmond)

Microsoft is launching the next version of Ax next year. There will be a conference where partners can have a early look on the application. The conference is held on the Redmond campus from January 17 through January 20, 2011.

You can find more information regarding this conference on http://www.microsoft.com/dynamics/DynamicsAXtechnicalconference2011.

How to make methods on fields disappear (aka a bug)

Me and some of my colleagues are currently working with a customer on a Ax 2009 SP1 RU4. The other day we came to the conclusion that the modified methods on fields in a form suddenly disappeared. I know, you should write as less as possible code on a form, but sometimes there is no way around this.

After some research we found a reproduction how these methods suddenly disappeared:

  1. Go tot the AOT and chose a form
  2. Open the [FORM] -> Data Sources -> [TABLE] -> Fields -> [A FIELD] -node
  3. Add a method (for example the modified-method)
  4. Save your form
  5. Go to the properties of the table in the datasource
  6. Place your cursor in the table property (properties window)
  7. Push ENTER

The result is that the table will be reloaded in the form and all methods you created on the fields will be gone. So here you have another reason why you shouldn’t write lots of code on your forms. You can only lose it by accident.

Records with RecId 101090

I was using the postload method of the HRMBenefitType-table to fill the description-field with language-sensitive description (from LanguageTxt). This works fine when I view the record, but not when I use a lookup.

I’ve put a break-point on my postload method and noticed the recId (this.recid of the HRMBenefitType table). This is always the 101090. When I check this in the tablebrowser, this does not match the actual RecId valule.
I checked the SQL-trace-log and noticed the following instruction:

SELECT A.HRMBENEFITTYPEID,A.DESCRIPTION,A.RECVERSION,101090 FROM HRMBENEFITTYPE A WHERE (DATAAREAID=?) ORDER BY A.DATAAREAID,A.HRMBENEFITTYPEID OPTION(FAST 1)

The solution to this problem is simple. Just change the CacheLookup property to EntireTable and the strange behaviour of the RecId-field stops.

Best Practices – Technical Best Practices for Dynamics AX

While surfing on the web about Ax Best-Practices I found the following link on Packt Publishing. I think this is a verry good list of things a Ax developer should do while programming.

This article is a part of the book ‘Quality Assurance for Dynamics AX-Based ERP Solutions‘, maybe I’ll read it.

Read the rest of this entry »

Enterprise Portal – titlebar issue (part 2)

While I was checking my previous Enterprise Portal titlebar issue, me and my colleagues found a second bug. When you use a single quote () in the PageTitle, the name of the Page Defenition object is displayed instead of the actual label with the singel quote. We couldn’t find a solution yet, but we’re still looking.

Anyone any idea?

Enterprise Portal – titlebar issue

When you modify the PageTitle property of a new Page Definition to a label with a ‘special’ character in it. You will see that the title is not rendered well. For example when you use a é it will be rendered as &#233. I logged this case with Microsoft and for the moment there is no fix for this issue, but they suggested a simple workaround.

Workaround:
When you edit your page in Sharepoint, you can remove the ‘Dynamics Page Title Web Part’ and replace it by the old ‘Page Title Web Part’

Explanation:
The reason why there are two Web Parts is mainly the “Page Title Web Part” is the old Web Framework (Dynamics AX 4.0) – and rendering takes part in X++ code while “Dynamics Page Title Web Part” is implemented completely in C#.

(Source: Microsoft)

Enterprise Portal – strange behaviour with date-picker

Have you ever experienced the following symptoms in the Enterprise Portal:

  • click on a date picker (the date picker is shown)
  • click outside the date picker (the date picker is hidden)
  • finally, you re-click on the date picker

Result: you see the message ‘Loading data’ and a ‘error on page’ message appears in the bottom of your browser.

When you open the error you will see a similar error:

Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

Timestamp: Thu, 18 Jun 2010 06:00:00 UTC

Message: Sys.ArgumentNullException: Value cannot be null.

Parameter name: panelsDeleting[0]

Line: 4723

Char: 21

Code: 0

URI: http://dynamicsax/ScriptResource.axd?d=5kX_0LN0u7mwWn790LXsbY7Ctv1Hcwgr-zXRCNUAi2zkRoHYg1N1jlEUavJPzNwiZYTQiJ3dlxfzGp0UsvQxuKxp2przuGOLv2smzEfpZ-A1&t=ffffffff9b6540a0

Solution:
In the web.config file you will probably find a similar line: <compilation batch=”false” debug=”true“>. When you change the debug parameter to false (<compilation batch=”false” debug=”false“>) and execute a iisreset, this issue is solved. You will typically find this issue only in DEV-environments because debug should be turned off in a live environment.
Unfortunately Microsoft won’t create a Hotfix for Ax 2009 to solve this issue permanent. They ported the issue to Ax 6.0 and in the mean time we’ll have to use the work-around.

Smart projects

Every Ax developer tries to group their code from one defect or one analysis in one project. Sometimes you try to maintain the AOT structure in that project through groups (don’t forget to set the property projectGroupType). What some developers don’t know is that project-groups have a property GroupMask. Here you can fill in a prefix or part of a word and Ax will automaticly search through the AOT for objects that match this GroupMask. This system will also automaticly maintain itself.

Step-By-Step:
Go to your project and change the GroupMask property of a Group

Now when you save this and look at your project you will see the following:

Conclusion: Ax searches the AOT looking for all objects that matches the ‘projectGroupType’ and the ‘groupMask’.

Tip: When you set the GroupMask-property to ‘Tutorial’, Ax will look for all tutorials in the AOT. I have made a export of the project-structure, so you can have this output quicker. You can download this here.

Belgian Dynamics Community – Connecttion Day May 27th 2010

The Belgian Dynamics Community is organizing a Connection Day (Tips & Tricks) on May 27th @ 18:30. I will attend the Ax-track.

The Agenda:

  • 18:30 – 19:15
    General keynote track – Search Engine Optimization: 7 ways to get your web site to heaven
    Dimitri Op de Beeck, Sales Manager, Seltec

    A web site is not just another marketing channel anymore. It has become the cornerstone of your marketing and plays a defining role in how your company is perceived in the market. We’ll share seven useful tips for how your web site at the top of search engine results.
  • 19:30 – 21:00
    AX track – Microsoft Dynamics AX Enterprise Portal and Role Centers
    Koen Van Hauwenhuyse, DevTalk

    Learn about the enhancements made to Microsoft Dynamics AX Enterprise Portal, the cool new user experience, powerful ASP.NET/AJAX/VS.NET development tools, seamless setup and deployment options, out-of-the-box Role Centers, customization and adaptability. See how to build and customize enterprise portal pages and Role Centers to add new functionality and help meet customers’ needs.

You can find more info or register on dynamicscom.be

Dialog Extended

One of my colleagues (Koen Dedecker) was looking for a way to prevent user interaction with other forms while a certain dialog is shown. After some research he found the solution on the blog Dynamics AX tools and tutorials from Vanya Kashperuk. A few years ago (2007) he made a simple extension of the dialog class that makes this possible. You can find more information and download some code samples on http://kashperuk.blogspot.com/2007/06/3-dialog-extensions.html.

The trick is actually simple:

  • Create a new variable of the type Boolean en the classDeclaration of the Dialog-class
  • Create a public parm method for this new variable to get/set the value
  • Extend the wait-method by placing the following code before the close-statement:
    dialogform.formRun().wait(this.parmShowModal());

Now when you make a new instance of the dialog class just set the value of the parmShowModal() to true. From now on this dialog will stay on top.