Doens.be

  • Linkedin flickr twitter delicious Facebook Youtube

Posts Tagged ‘Tips & Tricks’

Index vs Index hint

This is a discussion I had with several colleagues. What is the difference between index and index hint and what do we use in our code?

(more…)

SQL Server Activity Monitor

I know there are much more fancy tools you can buy on the market than the standaard build-in Activity Monitor from SQL Server, but is a usefull tool that can help you monitor your Server. You can find it when you right-click on the server instance and then click on Activity Monitor.

The 2 grids I watch most is:

  • the processes grid (instead of sp_who2) -> for example to detect/remove DB-locks
  • Recent Expensive Queries -> to improve my indexes

A other tool (but payed) that can give you very good information about your SQL Sever is ‘SQL Sentry‘. You can download a trial from their website.

Where are breakpoints stored in Ax 2009

In Ax 2009 breakpoints are stored in 2 tables, the SysBreakpointList and the SysBreakpoints table. You can find those tables in the SQL Management Studio or in the AOT under System Documentation -> Tables. This is useful to know when you get ‘ghost-breakpoints’. My debugger started showing me older breakpoints from classes that were running in batch. What ever I tried, the breakpoints couldn’t be removed, even restarting the AOS made no difference. When you remove your (or all) records in both tables and restart your client/aos the ‘ghost-breakpoints’ were gone.

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…)

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?