Doens.be

  • Linkedin flickr twitter delicious Facebook Youtube

Posts Tagged ‘Dynamics AX’

Portal development

While surfing the web, I came across a blog from 2 friends (Youri De Brabandere and Christof Decraene) about Enterprise Portal development. For the moment they have only a few posts, but I’m sure their will be more soon.

Have fun with the http://www.axepclipboard.com.

Ax Security got lost

At one of the customers I’m currently working they took the decision to take a look at the spaghetti of security keys. We made a plan of how the new basic security-structure should look like and implemented it. After releasing this new more logical security structure we started to get the message ‘%2 %1 not initialised.‘.

After some research we discovered this issue occurred only with a few user groups and that the message only exists in the KTD-files, so it is kernel related. We checked the AccessRightsList-table for some inconsistencies but no luck. In the end we found a work-around that helped us solving this issue. When we make a export of the security and afterwards we import the export we just made, the issue disappeared by itself. Because there are a lot of user groups that could be infected with this issue, we automated this fix by running the import – export in a job.

Testing code on client/server

When you quickly want to test some code I often write some test-code in a small job. When you execute the code in this job, it will be executed on client-side. A colleague of mine asked me if he could test the same job while running on server-side.

Wen you quickly want to test the same code when it is running on server side, you can simply create a action-menu item from this job and change the property ‘RunOn‘ property to ‘Server‘. Now when you execute the menu item, the job will be executed on server.

Belgian Dynamics Community – Connection Day May September 30, 2010

Yesterday I subscribed to the Belgian Dynamics Community connectionday in september 30, 2010. I’ll attend the Ax-track (obvious) with some of my colleagues / friends.
The Agenda for the Ax-track:

  • 18:30 – 19:15
    General keynote track – The ins and outs of process optimization with SureStep 2010.
    Vincent Bellefroid, Plataan

    Most of us may have been in contact with or have at least already heard about SureStep 2010. But what is its real value in light of process optimizations? Is SureStep 2010 merely a theoretical implementation methodology or can it really help us optimize our processes irrespective of the stage of an implementation cycle.

  • 19:30 – 21:00
    AX track – Practical guide for Dynamics AX database optimization
    Rony Cooremans, Famco

    Discover the tools, skills and practices to troubleshoot database performance in Dynamics AX. After the session you will have a clear understanding on how you can investigate, solve and avoid common performance issues.

    Target Audience: Technical

You can find more info or register on dynamicscom.be

Loop all tables

There is a simple trick to loop all tables that are available in Ax. Just use the Dictionary-class that contains all information about tables.

Small example to list all tablenames + their corresponding Id.

1
2
3
4
5
6
7
8
9
10
static void JeDoe_listTables(Args _args)
{
    Dictionary  dictionary = new Dictionary();
    int         i;
    ;
    for (i=1 ; i<=dictionary.tableCnt() ; i++)
    {
        info(strfmt('%1;%2', dictionary.tableCnt2Id(i), tableid2name( dictionary.tableCnt2Id(i) )));
    }
}

When you combine this with a DictTable / DictField-object, there are lots of possibilities.

Enterpris Portal – Tips & Tricks (part1)

Ilearned something new from my colleague Koen Van Hauwenhuyse. He showed me 2 extra querystring parameters you can add tot the portal URL so the content will be shown different.

The normal Url of the page: http://***/TSTReplacement.aspx?WCMP=TST

The Url for the rolecenter-view of the same page: http://***/TSTReplacement.aspx?WCMP=TST&RUNONCLIENT=1

The Url for the same page without any navigation: http://***/TSTReplacement.aspx?WCMP=TST&NONAV=1

(more…)

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.

(more…)

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?