Other recent Dynamics AX Blog postings

Donnerstag, Mai 06, 2010

Austrian Dynamics Partner Community Blog

Recently we have started a Partner Community Blog for Austrian Dynamics Partners. Step on and check the latest information for Dynamics AX, NAV and CRM. Attention: The content of the site is in German.

http://www.dynamics-community.at/

Freitag, Juli 24, 2009

System Center Data Protection Manager Backup Assistance Tool for Microsoft Dynamics AX 2009

Microsoft has released a Backup Assistant Tool to facilitate the protection of Dynamics AX 2009 data and files with System Center Data Protection Manager.

You can download the tool and a white paper on Partnersource (Partnersource login needed): https://mbs.microsoft.com/partnersource/support/selfsupport/productreleases/ax-scdpm-backuptool.htm

Donnerstag, Juli 09, 2009

Running Dynamics AX 2009 on Windows 7 using Windows Virtual XP

One of the new features in Windows 7 is that it contains a new version of Windows Virtual PC which can be used to publish applications from the virtual guest system to the host system.

To showcase what can be done with published applications on Windows Virtual PC, I was trying to install AX 2009 on the Virtual XP guest and to run it afterwards as a published application on my Windows 7 RC host system.

First, you have to get the Windows Virtual PC Beta installer and Windows XP Mode Beta from here: http://www.microsoft.com/windows/virtual-pc/download.aspx

After installing everything, you will be able to start your Windows XP guest system and start installing the necessary components.
I will not go too much into detail about the installation steps (as this is just a showcase), so here are the necessary steps:

  • Install SQL Server 2008

  • Install Dynamics AX 2009 (AOS, Application Files, Client)
Right now you might think: "Stop! How could you install AX 2009 on the virtual Windows XP guest, it is not joined to a domain?"

Well, that was the really tricky part and as said before, I won't go into detail and just tell you: it was really hard but I managed to install it.
After everything was installed, AX is shown in the Windows Start Menu under Virtual Windows XP applications:

Now, you can start the virtual AX application and work with it. I imported some demo data which was located on my host machine into the virtual AX application.

As the new Windows Virtual PC is still in Beta, I have to say that although everything works smoothly, sometimes the Virtual application window disappears and you have to restart it from the start menu. After some time, the original window may appear again.

This is how AX 2009 looks like running in a virtual windows XP:

Mittwoch, Mai 06, 2009

Dynamics AX Whitepaper: Consuming external web services

Hi all,

after a long time, I wanted to share with you that a whitepaper written by me has been published on MSDN. It's about consuming web services from AX in a real-world example.
You can download the whitepaper directly from here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=ef3a50d2-61c8-4ffc-bce8-2caf038f98cd&displaylang=en
Or you can go to the AX developer download page on MSDN and get it from there: http://msdn.microsoft.com/en-us/dynamics/ax/bb467576.aspx

Freitag, Oktober 17, 2008

Goodbye and see you soon!

I've started working for Microsoft in Vienna on October 15th, so see you at some Dynamics events !

Freitag, Mai 23, 2008

Dynamics AX 2009 released

The long awaited Dynamics AX 2009 has been released. The RTM (Ready-to-Manufacturing) setup can be downloaded from Partnersource: https://mbs.microsoft.com/...

Mittwoch, April 16, 2008

AX 2009 feature: cross company support

Today I found an exciting new feature in Dynamics AX 2009: cross company support in forms, reports, queries and X++.
Yes, and it really is what you think: you can display records from different companies in a single form (or report). Yeah !

For a form, you just have to set the property AllowCrossCompany to Yes in the form's query and add a field that displays the company's ID to the forms's grid. That's it. Easy as that!

In X++, there is a new keyword crossCompany you can use in a select statement. Additionally, you can add a container with all the company ID's you want to include in your select statement.
So, your select statement could look like that:

while select salestable crossCompany : [dmo, cos]
{
... do something ...
}

Now, that's really a huge step forward from the good old changeCompany function.

Montag, April 14, 2008

New book: Quality assurance for Dynamics AX-Based ERP Solutions


The last days I could read a new book about Dynamics AX: Quality assurance for Dynamics AX-Based ERP Solutions



The target audience is project managers, AX developers, AX consultants, AX customers and all others who are interested in managing quality in Dynamics AX projects.

The book is divided into 9 chapters:
the first two chapters will introduce Dynamics AX as an ERP system and how it helps you to maintain quality in your customizations.
Chapter 3, "Best practices - Technical" gives you hints on how to use several AX customization standards.
Chapter 4, "Best practices - GUI" contains detailed checklists that you should follow designing your user interface.
Chapters 5 to 8 are giving an overview about how testing should be performed.
The last chapter contains an overview about the Dynamics AX tools you can use to guarantee quality in Dynamics AX.

How did I like the book? Well, there are some things in the book that can be useful, like the checklists for the user interface and the overview of the checks the built-in best-practice tool performs.
But there are 2-3 chapters in the book I could easily live without.

On an overall rating, I would give the book 6 out of 10 points.

If you want to order a copy, you can get it from Amazon: http://www.amazon.com/Quality-Assurance-Dynamics-AX-Based-Solutions/dp/1847192912/ref=sr_1_1?ie=UTF8&s=books&qid=1208193317&sr=8-1

The book was published by Packt Publishing: http://www.packtpub.com/

What's new in Microsoft Dynamics AX 2009

You can download a couple of Docs and Powerpoint files about what's new in Microsoft Dynamics AX 2009 from Partnersource: https://mbs.microsoft.com/...

Take a look to find out all the exciting new features!

Donnerstag, April 10, 2008

eBook "Inside Dynamics AX 4.0" available for download

The great book "Inside Microsoft Dynamics AX 4.0" is available as a free download now.
You can go to: http://download.microsoft.com/download/2/5/8/258C8894-B94A-4A87-81EA-4DBB9776F8F2/622579eBook.pdf to download your copy.

Attention: You may not print the PDF document.

Mittwoch, März 12, 2008

User Experience Guidelines (beta version) for Dynamics AX 2009

You can download the guidlines for the user interface in Dynamics AX 2009 from Microsoft: >http://www.microsoft.com/...

With that, you will also get an idea how the user interface will look like in Dynamics AX 2009.

Open web pages from X++ code

If you want to open the Internet Explorer with a certain web page directly from X++ code, you can use the following statement:

infoLog.urlLookup('http://nameofthepageyouwanttoopen.com');

Thus, your browser will open and display the URL.

Montag, Jänner 28, 2008

Displaying online help on installations with multiple windows languages

In Dynamics AX, you can specify your client config to be usable if you have different windows languages (this means that your AX client is not always in the "c:\program files\..." directory but also in "c:\programme\...").

Then, you would make the link pointing to your ax32.exe something like this: "%programfiles%\Microsoft Dynamics AX\40\Client\Bin\Ax32.exe" (and the bindir property of you AX client config would be: "%programfiles%\Microsoft Dynamics AX\40\Client\Bin")

With that setup, you can start your Dynamics AX client on any language that is used by Windows.

Well, there is one problem with the online help then. Dynamics AX cannot build the path where to search for the help file using the %programfiles% parameter and will give you an error when you activate the help.

What you have to do is to change the way the online help will create the path.
You have to modifiy the method getChmPath in class SysHelp as follows:

modifiy the line:

path = xInfo::directory(DirectoryType::Help);

to that:

if (WinAPi::fileExists('c:\\program files\\Microsoft Dynamics AX\\40\\Client\\Bin\\Help\\'))
path = 'c:\\program files\\Microsoft Dynamics
AX\\40\\Client\\Bin\\Help\\';
else if (WinAPi::fileExists('c:\\programme\\Microsoft Dynamics AX\\40\\Client\\Bin\\Help\\'))
path = 'c:\\programme\\Microsoft Dynamics
AX\\40\\Client\\Bin\\Help\\';
else path = xInfo::directory(DirectoryType::Help);

The change above will work for english and german windows installations and you can figure out how to extend that to other languages.

Donnerstag, Jänner 24, 2008

Getting new table fields into your form datasource (part 2)

After receiving some comments to my previous post (well, in fact it was my intention to get some feedback on it how to do that properly), here is the way to get your new fields of your table to your form's datasource:

after you have added the fields in the table and saved the table, go to the form where the table is used as a datasource, right click on it and select "Restore". After that, you will have your new table fields available in your form's datasource.

A big thanx to denis and jamie for providing me comments on that !

Dienstag, Jänner 22, 2008

Getting new table fields into your form datasource

When you create new fields in a table and then go into a form where this table is used, you will not see the new fields in the forms datasource. You could be tempted to go into the properties of the datasource and re-select the table (which would actually add all the new fields).

BUT: Don't do it! You will loose all your modifications and methods made in the datasource !

Better: just exit the Dynamics AX client and enter again. Then, all new fields will appear in your datasource.

Mittwoch, Jänner 16, 2008

Copying one line of a grid to Excel

If you want to copy just one line from a Dynamics AX grid to Excel and you just click on the line marker of the grid to select the line, press Ctrl-C in Dynamics AX and then Ctrl-V in Excel, you will not get the line into Excel. Sometimes you will only have one active field of the line in Excel.

What you have to do: press SHIFT when you select the line. Then, copy and paste the line into Excel and it will work and copy the whole line.

Sonntag, Dezember 23, 2007

Merry X-mas!

A very merry christmas to all my readers and a happy and successful New Year!

Samstag, Dezember 22, 2007

Don't trust the execution plan within AX

The other day I was attending a lesson concerning the new Dynamics AX trace parser tool. With that tool (you can download it from Partnersource and Customersource, eventually), you can analyze the trace files that are generated if you activate the tracing options (both on the server and the client side).

With the tool, you can analyze all the information that is sent between the client, the server and the database. Another point that was pinned out was that the execution plan you see in Dynamics AX (if you trace long running queries in Dynamics AX, you can click on "Execution plan" and see which execution plan is used by Dynamics AX).

Well, the execution plan shown is not the one that was actually used by the database. It is the execution plan that would be used right now, the moment you clicked on the button.

So, don't trust the execution plan for the queries run, but you can use it for future queries, so you can see if a new index will be used or not.

Dienstag, Oktober 30, 2007

Catching keystrokes and the task() method

As a follow up to my previous post about catching keystrokes in Dynamics AX, I received some comments telling me I should use the task() method on the form.

Well, the task() method can be used to catch some keystrokes (most of them described in the Macro Task in the AOT), but this is only some "system keystrokes", as I would call them.

So, you can catch Alt-F9 (delete record) or F1 (Help) or copy and past (Ctrl-C/Ctrl-V), but you cannot catch e.g. other function keys with it or keystrokes defined by yourself like Alt-S or Ctrl-S.

Take a look at the Task macro in AOT and you'll get an idea what kind of keys you can catch with the task() method.

Freitag, September 28, 2007

Clear SQL Cache

When you do performance tests in Dynamics AX, you often want to clear the SQL cache so you can be sure that all data must be re-read from the disks.
If you want to clear the SQL cache, execute these 3 lines in a query window:

CHECKPOINT
DBCC DROPCLEANBUFFERS WITH NO_INFOMSGS
DBCC FREEPROCCACHE WITH NO_INFOMSGS

Donnerstag, August 30, 2007

Label for query range cannot be modified in AX 5.0

I've now checked this function and I have to say that it still doesn't work. If you change the label for a query range, AX 5.0 will give you an error message, too.

This is a follow up to a previous post: http://axaptafreak.blogspot.com/2007/07/label-for-query-range-cannot-be.html

Dienstag, August 28, 2007

Catching keystrokes or function keys

The last days I've been struggling to find a way to catch keystrokes in a form to create keyboard shortcuts for the users. Well, I didn't succeed so far but I found something concerning function keys.

In the shop floor control module, some forms use functions keys to control the form buttons (e.g. the form "JmgRegistraion"). I invested some time in it and it seems to me that the form doesn't really catch the keyboard event. The form uses a third party DLL and if you press F1, it will send the key "1" to the keyboard buffer. The buttons in the form have the numbers 1-9 as their first letter in the button text (property "Text" for the button).

So, you press F1, the DLL sends the key "1" to the buffer and AX then connects it to the button that starts with "1".

Well that's not really what I was looking for (and moreover, it will not work for F10, F11 and F12. It doesn't work for those keys in the mentioned form.)

But it's a start.

Donnerstag, August 02, 2007

Activating query tracing for all users

Sometimes when you are tracking performance (or other) problems, you may want to activate the long running query tracing for all users. Here is a little job that will do that. Beware: you have to activate trace settings on your AOS server, unless most of the queries will not be caught.


static void Set_SQLTrace_AllUsers(Args _args)
{
#LOCALMACRO.FLAG_SQLTrace (1 << 8) #ENDMACRO
#LOCALMACRO.FLAG_TraceInfoQueryTable (1 << 11) #ENDMACRO

boolean set;
UserInfo userInfo;
;

set = true;
ttsbegin;
while select forupdate userinfo
{
userinfo.querytimeLimit = 1000;
if (set)
{
userInfo.DebugInfo = userInfo.DebugInfo | #FLAG_SQLTrace;
userInfo.TraceInfo = userInfo.TraceInfo | #FLAG_TraceInfoQueryTable;
}
else
{
userInfo.DebugInfo = userInfo.DebugInfo ^ #FLAG_SQLTrace;
userInfo.TraceInfo = userInfo.TraceInfo ^ #FLAG_TraceInfoQueryTable;
}

userinfo.update();
}
ttscommit;
}

Dienstag, Juli 24, 2007

Label for Query Range cannot be modified (still)

In a query range (open AOT, Queries, any query, any range field), you can specify the property "Label". So you could display another label than the standard field label to be used in a query.

Unfortunately, if you put a label into the query range, Ax will give you an error "Field xxx does not exist", where "xxx" is the label you wanted to use.

This error existed in Axapta 3.0 and it still in exists in 4.0. (Maybe it also existed in 2.5 and back, so it could have a long bug history...)

As soon as I get the time to install my Ax 5.0 CTP application, I will check if the error is there as well and will tell it to the MS guys, so they can fix it for the next versions.

Dienstag, Juni 19, 2007

Automatically open grid filter when opening form

In some forms it may be convenient that the grid filter (new in Ax 4.0) is activated automatically. If you want to get that behaviour, just add one line in the form's run method, just after the super() call:

this.task(2855);

So, your run() method should look like:


public void run()


{


..... // some programming lines....
super();
this.task(2855);



}

Montag, Juni 04, 2007

Be careful when resetting your usage data

First of all, my apologies for not having written anything in the last weeks. But I'm really busy with my project at the moment....

But here's another thing for you:
in Dynamics AX 4.0, a "Favorites" menu was introduced. You can drag a form to your favorites pane. Then you will be asked to give it a name, and: you can add a saved query to it. With that, you can easily make favorites the open the forms filtered on the data you just need.

But there's another thing: as long as your system is still in change, everybody recommends that you delete your usage data from time to time (in User/Options).

But what happens to your favorites if you delete all your usage data?
The answer is: you'll get an error message. The system will tell you that it cannot find your saved query anymore. So, the whole work saving your queries and making your favorites is lost.

A small little addition to the method "reset" in the form "SysLastValue" will help you avoid that.

Add the line

&& _sysLastValue.recordType != UtilElementType::UserSetupQuery;

in the "delete_from" statement.

So, the deletion will not delete your saved queries.
Things that could be improved:
  • Only skip queries that have been saved with a name
  • Only skip queries that are used for a favorite menu item

Mittwoch, April 18, 2007

Microsoft MVP, finally !

With some days delay, I can now tell you that I have received the prestigious Microsoft MVP (Most Valuable Professional) award.

There was a problem with my email address so I didn't receive the award mail from Microsoft, but now the issue was solved and I can tell you very happily that I am MVP for Dynamics AX.

I want to thank all my fellow Dynamics AX geeks and everybody I know and who know me via my blog. Thanx to all who took part in my MVP nomination.

It was always my intention to share my knowledge to increase the value of Ax(apta) to all its users. Another thing was of course that the better your name in the community, the more likely you will get answers yourself in case of a problem. So another thanx to all the people that helped me out when I needed it myself.

I will continue to share my knowledge via my blog, so make sure you keep updated !

Sonntag, April 15, 2007

User interface changes in SP1 for Dynamics AX 4.0

One change in the AX user interface I just found out: if a user has no access to a button, the button is not displayed anymore in the form (the button has a security key assigned and the security key access is given to a certain user group).
Before SP1, the button was just greyed out and not clickable.

Another change in the user interface: every button in a form gets a keyboard shortcut which is displayed in parentheses ().

And: there is not "Favorites" button anymore. You have to activate/deactivate the favorites window via the "View" menu.

Donnerstag, April 05, 2007

Happy Easter with Tabax for DAX 4.0

I want to wish everybody Happy Easter and my present for you from the easter bunny is: Tabax is now working with Dynamics AX 4.0.

Max Belugin did a fabulous job in implementing a tabbed interface for Dynamics AX 3.0 and 4.0. There are 2 versions available: TabaxLite for end users and Tabax for developers and power users.

The homepage for Tabax is http://www.axaptapedia.com/Tabax but unfortunately the latest version (0.3Beta5) is not available yet. But: have an eye on it!

Freitag, März 30, 2007

DAX 4.0 Clustering question

Rob asked me in a comment to a previous post (Link):

"Wouldn't the session manager take care of directing a request to a certain
AOS ? (I.e. load balancing).When not using the session manager, how is
determined which AOS in the cluster to use ?"

Well: I can only assume that it makes the same as Axapta 3.0 (but better): the client tries to connect to all AOS servers in it's configuration. Each AOS server tells the number of users connected, the client connects to the one with the lowest user count.

Hmm, if anybody from Microsoft is reading this and knows how it works, please give us some feedback.

Freitag, März 16, 2007

Send message to online user in Dynamics AX 4.0 (quick & dirty)

I am missing the functionality to send messages to online users that existed in Axapta 3.0 and is now gone. Well, I thought you could use the "Alert" functionality introduced in DAX 4.0.
What to do:
1. make sure the user options are configured correctly (that means: set "Time poll interval" to 1 minute, set "Show popup" to "For all event rules")
2. make a button in the online user form that will open a dialog where you could enter your text
3. send the message to all users selected in the online user form datasource

Here is a little job that creates an alert for a user. Remember this is a quick & dirty solution, so there are some drawbacks:
* you will get an error in the alert form on the second tab
* the message will only be displayed about 15 sec and disappears afterwards (you can check FRM EventAttentionGrabber to change that. Check methods fadeIn and fadeOut for variable opacity. This should give you a hint on how to display the form longer)
* the message will stay as unread until the user marks it as read

So you see there's lot of room to improve it... 8-)

Remember also to replace the "curuserid()" with the user id you want the alert to be sent to.

This is merely meant as an idea on how you can achieve sending messages to a user.

static void sendAlert(Args _args)
{
EventInbox inbox;
EventInboxId inboxId;

inboxId = EventInbox::nextEventId();

inbox.initValue();

inbox.ShowPopup = NoYes::Yes;
inbox.Subject = "Message to online user";
inbox.Message = "Message you want to send to user";
inbox.SendEmail = false;
inbox.UserId = curUserID();

inbox.InboxId = inboxId;

inbox.AlertCreatedDate = systemdateget();

inbox.AlertCreateTime = timeNow();

inbox.insert();

}

Donnerstag, März 15, 2007

Roadmap for Dynamics AX

Googling around for more info on Dynamics AX 5.0, I stumbled over this interesting link: http://blogs.zdnet.com/microsoft/?p=325 which tells us the following scheduled dates:

* Dynamics AX 4.0 Service Pack (SP) 2: Summer 2007

* Dynamics AX 4.0 extensions, including CRM integration and Lean Manufacturing methodology integration: Q4 2007

* Dynamics AX 5.0: Second half of 2008

* Dynamics AX 6.0: 2010

Mittwoch, März 14, 2007

Dynamics AX 4.1 renamed to Dynamics AX 5.0

I've just read on the UK partner website that AX 4.1 will be renamed to AX 5.0. The scheduled release date is Q1/2008 (well it says 2008 but I've read somewhere that it could be released in Q1). There should be more info on Partnersource, but I don't have access to that.
Link: https://partner.microsoft.com/UK/40032627

Donnerstag, März 08, 2007

Using global search for virtual tables

The global search is a feature in Dynamics Ax 4.0 which allows you to search for a string in several tables (like a full text search). You setup some tables and fields to be searched in and start a data crawler that collects the data to be searched.

Now, if some of your tables that are searched belong to a virtual company, the data crawler will mark them as records of the company it is running in. That means that if you want to search for your virtual data from a different company, it will return no results.

Example: you have the companies xxx and yyy and a virtual company vir. Table CustTable is virtual (dataareaid of the records is vir). The data crawler runs in company xxx and will mark the CustTable records as belonging to company xxx .
Now, if you start a search in company yyy, it will not find the Custtable records as they seem to belong to a different company. You could only set up a second data crwaler for company yyy which would collect exactly the same records and you would need to store them twice in your database.

The following changes will circumvent that: you will be able to see data from different companies. There are some drawbacks, however: you will be able to see search results from your "data crawler company". But it the data is from a non-virtual table, you will not be able to see the results. But I hope it will lead you to a way where you can make your own modifications to get the best out of the global search. Remember: all changes you make are at your own risk.

Here are the changes you have to do:

Class SysGSSearchStart, method startSearch
comment the following line:
infolog.add(Exception::Warning,"@SYS98793");

With that, there will be no warning if you are working in a company where the data crawler is not running.

Class SysSearch, method search:

at line 28, just after "if (!searchname)" add:
select firstonly RecId from sysSearchName
where sysSearchName.Design == 'SDS_xxx_default'
&& sysSearchName.LanguageId == this.languageId();

if (!sysSearchName)


replace the xxx in the 'SDS_xxx_default' with the company id where the data crawler is running.

Class SysSearch, methods searchWord and searchExactWord:

at line 11, replace the "where sysSearchName.Design == this.design() &&" with:
where (sysSearchName.Design == this.design()
sysSearchName.Design == 'SDS_xxx_default') &&

again, replace the xxx in the 'SDS_xxx_default' with the company id where the data crawler is running.

Class SysSearchDoDataSearch, method buildItemListXML:

at line 11, after a while select indextable from sysDataSearch block, add the following code:

changecompany('xxx')
{
sysDataSearch = null;
while select IndexTable from sysDataSearch
{
dictTable = new DictTable(sysDataSearch.IndexTable);
if (dictTable.rights() != AccessType::NoAccess)
searchTableMap.insert(dictTable.id(),0);
}
}
sysDataSearch = null;

Replace 'xxx' with the company id where the data crawler is running.

At line 77, after select sysDataSearch where sysDataSearch.SearchGroupId == m_eSearchGroupDef && sysDataSearch.IndexTable == tableid; add the following code:

if (!sysDataSearch)
{
changecompany('xxx')
{
sysDataSearch = null;
select sysDataSearch
where sysDataSearch.SearchGroupId == SearchGroupDef
&& sysDataSearch.IndexTable == tableid;
}
}

Replace 'xxx' with the company id where the data crawler is running.

Dienstag, März 06, 2007

Ax 4.0 SP1: new clustering functionality

In Ax 4.0 SP1, the new "session manager" for AOS clustering was introduced (so you do not need NLB anymore). This, however, means a new single point of failure, because if the session manager crashes, clients will not be able to login to AX anymore.
The good news, though, is that you do not need the session manager!

Make the following setup: several instances of AX, mark all with the flag "Make this AOS instance part of the load balancing cluster". In the client config, add all your AOS instances on the various servers. The client will connect to one of the available servers. And the good thing is: this setup will work, even if one or some of the AOS instances are not running (this did not work in Axapta 3.0: there the client would have said that it cannot connect to the AOS server).

What I do not know right now: what do I need the session manager for?

Donnerstag, März 01, 2007

Ax 4.0 SP1: Client still quits if AOS stops

I 've read somewhere that it might be possible in Dynamics AX 4.0 SP1, using the new "Session Manager" for AOS, the following could be working:
the client logged in on Server1, the server stops and the client automatically connects to Server2 (both in the new styled AOS clustering using the session manager).
Well I just tested it and it's not working like that. If the server on which the client logged on has a problem (e.g. service stops), the client is still kicked out of Dynamics AX.

Dienstag, Jänner 23, 2007

XPO for complexity analysis add-in

Anders Tind Sørensen has sent me the xpo for the complexity analysis add-in to the best practice checks and you can download it here: http://www.axaptapedia.com/... on your own risk.
This is a follow-up to a previous post: http://axaptafreak.blogspot.com/2006/10/extension-of-best-practice-checks.html

Samstag, Dezember 30, 2006

Happy New Year!


I want to wish all of my readers a happy and brilliant NEW YEAR!

Freitag, Dezember 29, 2006

Goodbye, axdat.udb !!!

One of the very good things about Dynamics AX 4.0: there is no axdat.udb file anymore! All information about users online etc... is kept in the database.

The table that holds the users' data is called SYSCLIENTSESSIONS.
The table that holds the AOS' data is called SYSSERVERSESSIONS.

It seems to me that SysClientSessions will contain the sessions that had been logged in on the current day (no matter if they are still logged in or not). Currently logged in sessions will have the field STATUS set to 1.

Samstag, Dezember 23, 2006

MERRY XMAS!


I wish all of my readers and friends a very merry and wicked Christmas !!!!

Donnerstag, Dezember 21, 2006

Sending Emails via SMTP on AOS server

I had the following problem: our partner made a class which sends emails to users via SMTP using the SysMailer class. It works well using a local client. Unfortunately, when you run the class in batch, it gives you a .NET permission error (the BatchRun class has the RunOn property set to "server").

I don't have any knowledge in .NET, but fortunately I found a similar problem in Fred Shen's blog (http://fredshen.spaces.live.com/). I mailed him my problem and instantly got an anser and a solution !

Here is the Fred's answer. I tried it and it works! (I marked the changes to be done in the method with red color)

Whenever you initialize the sysmailer class, put InteropPermission.assert() before new SysMailer(). When you look into SysMailer.new() method, you may find that the COM c = new COM(' CDO .Message') is not in the scope of interopPermission.assert(). (I thought it should be a code defect) So alternatively, you can restructure the codes in SysMailer.New() as below:

void new(/* COM c = new COM(' CDO .Message')*/)
{
COM cdoConfig;
COM c;
InteropPermission permission = new InteropPermission(InteropKind::ComInterop);

;
permission.assert();
c = new COM('CDO .Message');
_COM = c;
//BP Deviation Documented
if (_COM.configuration() == null)
{

And that's just what I want to achieve with my blog: to get to know people and to help each other. So again: THANX A LOT, FRED !

Montag, Dezember 18, 2006

Enabling SQL trace in Dynamics AX 4.0

If you want to trace your SQL statements in DAX 4.0 (e.g. long running queries), you have to enable the SQL trace flags in the user options. But that's not all. You will see nothing unless you enable it on the server, too!
Go to the Dynamics AX Server Configuration Utility, tab "Tracing" and enable the flag "Allow client tracing on Application Server instance".

Freitag, Dezember 15, 2006

Ctrl Alt F4 not working?

2 weeks ago, I got a new laptop and started working on it with Dynamics AX 4.0. Unfortunately, the good old shortcut for "Go to main table", i.e. Ctrl-Alt-F4 did not work anymore. First I thought it's because of DAX 4.0, but then I found out that the shortcut was working on other PC's. I remembered that I had the same problem years ago and fortunately I found the reason:

The display driver of the graphics card was the villain. You have to disable the shortcuts in your graphics driver, then the "Go to main table" shortcut will work again.

Mittwoch, Dezember 13, 2006

Blog design updated

I just made an update of the design of the blog. I always wanted to have the actual "text" part bigger which it is now.
I hope you'll like it.
P.S.: The next Axapta article will probably be about the new global search.

Freitag, Dezember 01, 2006

Dynamics AX 4.0 SP1 (aka DAX 4.01) released

You may have read that in other blogs: Microsoft has released the SP1 for Dynamics AX 4.0 today.
You can download it from Partnersource (if you are a partner) or CustomerSource (if you are a north american customer).

All others (like me) cannot download directly but must contact their Axapta partner.

Dienstag, November 21, 2006

Adding Favorites programmatically

In Dynamics Ax 4.0, each user can have a Favorites pane. Normally, you can add a menu item to the Favorites pane by dragging and dropping it. I created a small job where you can see how to add a form programmatically to the Favorites pane. (The job has been created using some standard methods).

The job can be downloaded from Axaptapedia here: http://www.axaptapedia.com/images/6/63/Job_hw_addToFavorites.xpo

The Axaptapedia page for this is: http://www.axaptapedia.com/Adding_Favorites_programmatically

Next steps can be: adding a query to the favorite via X++, add a button on each form to add it to favorites

Montag, November 20, 2006

AOT search: project now on Axaptapedia

The upload to Axaptapedia works now, so you can download the last project now at http://www.axaptapedia.com/images/9/99/AOT_SearchExtended.zip

Donnerstag, November 16, 2006

AOT search within search results

One of the things that happen to you when you take an active part in a community is that you actually build up a community. This way, I get emails with questions about Axapta but also people send me their projects to test them.

So, a guy called Jonathan Watkins asked me if I can test a tool called "AOT Search extended" for him. Well I did now so I will share it with you all.

What does the tool do? When you search something in AOT, you get a load of results. And what if you then subsequently want to search inside these results?
That's where the tool can help you. Just before you do your initial search, click on "Save results". After the search has finished (or you stopped it), click on "New search" and it will ask you if you want to search within your previous results.
Cute, isn't it? The tool has been made in Axapta 3.0 SP4, but will also work in other 3.0 versions.

I have created a page in Axaptapedia for it, you can find it here: http://www.axaptapedia.com/AOT_Search_within_search_results

You can also download the tool directly from here: http://www.geocities.com/axaptafreak/Files/aot_searchextended.zip

And, as always: my apologies if you cannot download the file. I have no webspace so I have to put it on my Yahoo Geocities account which has limited traffic allowance.

Mittwoch, Oktober 25, 2006

Extension of Best Practice Checks: Complexity Analysis

Today I stumbled over an interesting PDF. It is called "Measuring Complexity In X++ Code" and written by Anders Tind Sørensen.
It looks like a Bachelor thesis for the Technical University of Denmark and what it is all about: Anders makes an addition to the Best Practice Checks in Axapta to measure the complexity of the written code. This is made by some rules like: number of lines, comment percentage, depth of inheritance, number of children, etc...

All changes made to Axapta are inside the PDF and an xpo is also mentioned, but I could not find it (and no mail address of Anders...). As there are no copyright restrictions in the document, here is a link for you to download it: http://www2.imm.dtu.dk/.../imm4708.pdf

Donnerstag, Oktober 12, 2006

Semicolon in classes: another hint

This is kinda follow up to one of my previous posts where I showed a link to Max Belugin's conclusion about semicolons in classes. (Orig post here: http://axaptafreak.blogspot.com/2006_03_01_axaptafreak_archive.html)

Today I found another funny thing about it (well it's not really my idea of fun but whatever).
I added some lines in the Info class, method startupPost (it was in fact to automatically start Tabax, a great tool by Max Belugin). Now: it was working when I started the Axapta client locally on my PC (using a 3-tier client).
But: when I logged on to a terminal server and started the Axapta client there (also 3-tier, same application, same database, same everything), it DID NOT WORK !!?!?

It took me some time to find out what the error was: a missing semicolon after the variable declarations. I still can't imagine why on earth it was working locally on my PC and not on the terminal server (there were no errors or so, it just skipped the lines).

Freitag, Oktober 06, 2006

Tabax: tabbed Axapta interface !!!!

My friend Max Belugin has implemented another great tool for Axapta: Tabax

With Tabax, you have all your open Axapta windows displayed at tabs just underneath the standard icon bar. It's great if you work with your windows maximized because now you can switch between the windows with just a click.

There are some more features like: opening table browser with a click (it will take the datasource of the current form and open the table broser for it), editing the current window, showing xreferences for the current window.

You can get it from here (it's strongly recommended!): http://www.axaptapedia.com/index.php/Tabax

Dienstag, Oktober 03, 2006

BREAKPOINT command in X++

Hi! I'm back on track and the first thing I want to share after my vacation is a rather undocumented X++ statement: BREAKPOINT

In any X++ line, you can write BREAKPOINT; which will trigger a breakpoint on this line and open the debugger. With that, you could circumvent the fact that Axapta does not know conditional breakpoints and you could write a line like that:

if (i>10)
BREAKPOINT;

I have been using this statement for years, it has been working since Axapta 1.5 (the first version I had).

Freitag, September 01, 2006

On vacation yeah!

I'll be on vacation the next 3 weeks. I wish everybody a pleasant time using Axapta.

Freitag, August 25, 2006

Final confirmation: AX ISO from MSDN working

I re-installed Dynamics AX 4.0 from the MSDN ISO on a new server and it is working. The only thing I'm missing now is a demo company (that used to be included on the 3.0 Installation CD's).

Mittwoch, August 23, 2006

ISO seems to work, Axapta not....

The ISO from MSDN seems to be okay now. But somehow I cannot get Ax to start. I'll reinstall my VirtualPC or try it on a different server.

Dienstag, August 22, 2006

Dynamics AX 4.0 ISO available again on MSDN

I just saw that the ISO is available again. I'll try to download and install it and will keep you informed if it's working now...

Mittwoch, August 02, 2006

Dynamics Ax ISO from MSDN not working

It's now confirmed by me: the Ax 4.0 ISO you can download from MSDN is corrupt. I'll keep you informed when a new version is released.

Dienstag, August 01, 2006

Dynamics Ax 4.0 available on MSDN downloads

Dynamics Ax 4.0 can be downloaded from MSDN if you have an MSDN subscription (my subscription is MSDN general). There is a post in a Microsoft newsgroup that the ISO might be corrupt, I'll check that as soon as my Virtual PC is set up...

Mittwoch, Juli 26, 2006

Sorry!

Yesterday the blog was not available for some hours. There must have been some error during the last publishment of the blog so it wasn't displayed. Anyway, it's working again.

And to give you something to look for: I am doing a little project with which you can choose "Excel" as filetype in Axapta and the report will be opened in Excel afterwards automatically.

Montag, Juli 24, 2006

Tes procedure to check whether you can send mails via SMTP

I am trying to do some emailing out of Axapta at the moment and I found an old post in the development-axapta mailing list that provides a way to check whether you can send mails via SMTP using telnet.
You can take a look at the post here: http://www.mail-archive.com/development-axapta@yahoogroups.com/msg09750.html

Another tip: if you have installed McAfee VirusScan, it might block all connections on port 25 on your PC (to avoid mass-mailing viruses using this standard SMTP port). So check it and disable it if you want to use SMTP from your PC.

Mittwoch, Juli 19, 2006

Axapta Blogs and one more feed

Well, first of all: of course I forgot my own RSS feed in the list! Gosh! So here it is of course:
feed://feeds.feedburner.com/axaptafreak

And here are some other excellent blogs that do not have an RSS feed unfortunately: (the later ones do not show much activity but the first ones are brilliant)
http://axcoder.blogspot.com/
http://fredshen.spaces.msn.com/PersonalSpace.aspx
http://casperkamal.spaces.msn.com/PersonalSpace.aspx
http://axaptabuilder.blogspot.com/
http://dynamicsdoodles.blogspot.com/
http://axutilities.blogspot.com/
http://axgeek.spaces.msn.com/PersonalSpace.aspx?_c=

Freitag, Juli 14, 2006

Dynamics AX 4.0 Implementation Guide

You can download the new implementation guide here: http://www.microsoft.com/downloads/details.aspx?...

It seems like it's the same as the online version in MSDN and unfortunately it misses the same pages, too. But it's better than nothing, isn't it?

Dienstag, Juli 04, 2006

Project: Create Multi Files from xpo

Hi!
A long time ago, I wanted to be able to have the old XAL way of exporting elements in Axapta: that every element gets its own file. Therefore I made a class which will exactly do that. Parameters are: filename of xpo file and directory where the single files will be stored.
What will the class do: it will go through the xpo, scan for elements and make one file for each element. Then, you can use a file comparison tool (e.g. Beyond Compare) to compare the two directories and you will see all the new elements, changed elements and so on.

So, what is it for?
I have been using this class for years to compare releases, whole layers of different applications and so on.
I also used it for comparing new service packs to old service packs: just export a whole standard application and another one with SP1, run the class on both xpo files and compare the two directories with a file comparison tool.

There are some limitations to the class:
  1. You cannot re-import the created file. Reason: I have to remove one line in the file where the date of the export is stored. Due to the multi-language capabilites of Axapta I cannot figure out where that string begins. But I never wanted to re-import the xpo due to limitiation number 2:
  2. The created file will not have the nice layout of the original. It will miss all additional spaces. This is due to the fact that Axapta cuts off unnecessary spaces when reading lines into a container.
    The project can be used for Axapta 3.0 xpo files.

Anyway, I hope you will enjoy this little tool. You can also drop me a line into my inbox.
The project can be downloaded from the Dynamics User Group site here: http://dynamicsuser.net/files/18/ax_tools/entry1933.aspx

Donnerstag, Juni 22, 2006

Microsoft Dynamics AX information starting to flow...

Today I saw that Microsoft starts putting more AX information into MSDN. Here are some links where you can get the newest articles:

  • Using Microsoft Dynamics AX: Here you can select the kind of info you want to see: for users, IT admins, developers and common technical articles
  • MSDN Dynamics AX: The starting point where new AX information is put into MSDN, just click on any subject in the MSDN tree below. At the moment, it seems as if the MSDN tree is prepared but there is not much content, only a few things are available (like here: upgrading to Dynamics AX )

Freitag, Juni 16, 2006

All old technet postings in one PDF file

Ever wondered where all the documents from the "good old Axapta Technet" have gone? Well, just some days before Microsoft turned the old Technet off, I downloaded ALL documents (that is not the discussions! Those have been transferred by Microsoft into the Axapta newsgroups) and made one PDF file out of them.

The PDF, however, contains all the news articles, tips & tricks, etc. posted by Microsoft and so on. Some of the documents may be available somewhere at Microsoft sites, some may even have found their way into the official help docs.

Those who still know the old technet will recognize some of the docs, the newbies may take a look into it and check what's still interesting to them ('coz the content is more than 17 months old now).

I have uploaded the file on the Dynamics User Group site. If you are already a member, you can download it here: http://dynamicsuser.net/files/18/ax_documentation/entry820.aspx
If not, I think you have to register first (but it's worth doing so)

Montag, Juni 12, 2006

UPDATE: Axapta 3.0 Kernel Rollup 2 Performance Comparison

I have now made a second test run using the same Oracle DB once for the standard 3.0 SP3 kernel and once for the Kernel Rollup 2.
The tests showed no significant difference between the two kernel versions so my final statement is: the kernel rollup 2 has the same performance as the standard 3.0 SP3 kernel.

Freitag, Juni 09, 2006

Axapta 3.0 Kernel Rollup 2 Performance Comparison

I made a comparison of the performance using an Oracle 9i database. The test set is the same as in my comparison between Oracle and SQL 2005 and here are the results:

  • There is a major decrease in performing large select/filter statments in forms. In one of my test forms, the filtering in the form took more than twice as long using KR2.
  • Some reports ran a little bit faster using KR2.
  • Overall: the performance using KR2 was about 10% less than using a standard 3.0SP3 kernel. If only reports are compared, KR2 was about 4% better than standard 3.0SP3.
I will rebuild the statistics on my Oracle DB and run the test again, as the first point is a little disturbing to me.

Freitag, Juni 02, 2006

Axapta Blog now has more than 10.000 visits

Hi all!

Last month was the month with the most user visits on my blog so far: almost 1400 visits in May 2006. There are now more than 10.000 unique visits in total, too (>14.000 incl. reloads).
I hope everybody is enjoying the blog and gets some info out of it (I try my best).

Have a nice day!

Mittwoch, Mai 31, 2006

Axapta 3.0 Kernel Rollup 2 released !!!

The Kernel Rollup 2 has been released. Here are links to the fix list and the readme:
KR2_Fixlist.htm

(Edit: I removed the link to the readme due to copyright reasons)

Dienstag, Mai 30, 2006

Search for item id in config id lookup (in queries)

We had the following problem: we are using a lot of config ids for items. Now, when you click on the lookup button of a config id field in a form, Microsoft has made some changes so it will only show you the configs of the current item (in the form).
This does not work, however, in a standard query (like a report query). There, the lookup for config id will show you *all* config ids of *all* items in Axapta.

The easiest possible way to make it a little more usable for me was to add the ability to search for item ids in this lookup (which is not possible in standard).

So please download the changed form here and enjoy: http://www.geocities.com/axaptafreak/Files/configidlookup.zip

Montag, Mai 29, 2006

Display session's AOS name in online user form

When you have more than 2 AOS servers in your Axapta setup, you might experience the following problem: the online user form will only tell you whether the user displayed is currently working on the same AOS as you (then it will say "thin") or on another AOS (then it will say "NotAOS").

As long as you only have 2 AOS that's not a big problem, as "Thin" will mean the user is on the same AOS as you and "NotAOS" means he is on the other one.

But if you have 3 or 4 AOS, "NotAOS" will not tell you on which of the other AOS the user is working on.

So, here you can download a little project where one column is added to the online user form displaying the AOS setting of the user (including AOS cluster information):
http://www.geocities.com/axaptafreak/Files/hw_sysusersonline_aosname.zip

You will see the additions I made when you compare the elements in Axapta. It's not a big deal but I needed that info very often so here it is for you.

Montag, Mai 08, 2006

Axapta Audit Trail (Table TransactionLog)

2 things about the audit trail:


  1. Palle Agermark has posted an interesting article about the audit trail and when records will be created depending on the TTS level of the application. You can read it here: http://blogs.msdn.com/palle_agermark/

  2. We recently ran into the problem that we got error messages in Axapta saying "Cannot create a record in Audit Trail. The record already exists." We are running Axapta 3.0 SP3 (upgraded some years ago from 2.5). Unfortunately, the error is repaired in SP4, but you can actually repair it also in SP3.

    Go to the class "ReleaseUpdateDB_V30toV30SP" and copy the method "RepairTransactioIdPerTableV30toV30SP" into a new job. (NB: The method will only exist in a SP4 or SP5, of course).
    In the job, you have to comment the first line after the variable declaration, that is this.tableProgress(tablename2id('dataArea'));
    You can run the job and all your entries in the SystemSequences table will be corrected.

    Please also check the table SQLSYSTEMVARIABLES in your database. Check the value for the parm "Index". If it is below 256, you also have a second problem -> please write a comment and will explain further what to do.

Freitag, April 28, 2006

Dynamics Ax 4.0 Supported Configurations

A Microsoft bloke has posted a whitepaper on his blog which tells us which hardware/software configurations will be supported by Dynamics Ax 4.0. Here is the link: http://blogs.msdn.com/nolansax/archive/2006/04/12/574801.aspx

Montag, April 24, 2006

Microsoft Dynamics Ax 4.0 Supported Configurations Whitepaper

A Microsoft bloke has posted this document about different hardware configurations for Dynamics Ax 4.0 in his blog. Here is the link: http://blogs.msdn.com/nolansax/archive/2006/04/12/574801.aspx

Freitag, April 21, 2006

Reports displaying *****

If you have a report that only displays ***** instead of numbers, you have one easy way of showing the correct numbers without any modifications:
Print the report to a file and open it in Excel (field delimiter is TAB) --> you will see all the numbers in Excel.

Donnerstag, April 20, 2006

Axapta 4.0 Layman Specification March 2006

There is a new Layman Specification available for Dynamics Ax 4.0 available. Some Microsoft bloke has put it on his blog, so here is a link to it:
http://blogs.msdn.com/nolansax/archive/2006/03/28/563084.aspx

Axapta Performance Oracle9i SQL2005 Part 2

I have conducted some more tests and the results stay the same:
SQL 2005 is about 14-20% slower than Oracle9i.
But I know that Microsoft is working very hard that this changes with Dynamics Ax 4.0

Dienstag, April 18, 2006

Axapta Performance Comparison Oracle 9i and SQL2005

I finished the first performance tests and here are the results. The configuration is as follows:
Oracle: 9.2.0.4, used Axapta client is 1951.3733
SQL2005: used Axapta client is Kernel Rollup 1

The test server is a P4 2.8 GhZ with 2GB of RAM. Both Oracle and SQL2005 have 1GB RAM assigned (not at the same time. Either Oracle OR SQL2005 is running.)

The first tests show that SQL2005 is about 25-30% slower than Oracle if the database is running in SQL2000 mode.
The performance is a little bit better when running in native SQL2005 mode: then SQL2005 is about 14-19% slower than Oracle.

The biggest surprise was that Oracle was always faster when a certain test (form filter/report execution) was done the second time and the data was coming from cache. It seems that the caching algorithm of Oracle was much better than from SQL2005. There was a range of 45-150% worse performance in SQL2005 when getting data from cache.

Freitag, April 14, 2006

Axapta Blog is featured community

Today I saw that my blog is a featured Microsoft community at the moment. Wow.
I just also wanted to tell you what I am doing right now: currently I am doing a performance comparison of our system between Oracle 9.2.0.4 (currently our live system) and SQL2005.
I have read in many forums that the Kernel rollup also decreases performance. Well, I will also try to check that.

Mittwoch, April 12, 2006

Specifying empty date values

If you want to set a date field to an empty date or need to compare if a date field is empty, you can use the datenull() function. It is a method of the Global class and will simply return 01\01\1900.

This leads to more things:
  1. You can write dates in Axapta X++ editor using backslashes, e.g. 14\04\2006
  2. An empty date in Axapta is specified as January 1st, 1900.
  3. You can use methods from the Global class without having to write "Global::". So, you can write "if date == datenull()" and you do not have to write "if date == Global::datenull()". This works with all the methods from the Global class.

Montag, April 10, 2006

Axapta 3.0 SP5 Fixlists

Here are the links to the fixlists of the Service Pack 5 (SP5) for Axapta 3.0.
And: Please, Microsoft, give European customers access to CustomerSource...

Attention: the Geocities page where the files are located have limited download capacity. So if it doesn't work, check later. (I still don't have any storage capacity).

Financial management
Manufacturing Service Organization
Supply Chain Management
Tech 1
Tech 2

Mittwoch, April 05, 2006

Fixing online user form bug (Ax 3.0 SP3 on Oracle)

There is a standard error in the online user form that is occurring with Oracle only.
Please check the "Info" class and there the methods:

  • licensedUsers
  • licensedComUsers
  • licensedAOSUsers
  • licensedObjectServers

In all those 4 methods (well, "licensedUsers" is the most important, but please change the others as well), add the following line to the "select sysconfigtemp" statement:

&& sysConfigTemp.ConfigType == ConfigType::AccessCodes;

So, the select statement should look something like this:

select sysConfigTemp
where sysConfigTemp.id == licenseCodeNum(...)
&& sysConfigTemp.ConfigType == ConfigType::AccessCodes;

Why all that? Well, when you start the Online Users form, Axapta will check how many users are in your license. It will then only show online users up to that amount. The methods above are not giving back the correct numbers because they are looking into the wrong record. So, Axapta thinks you are in demo mode and will only display 3 users. Why is it only on Oracle? --> On MSSQL, there is a Clustered Index used on the Sysconfig table so that Axapta chooses the right records by chance !

Example: the method "licensedUsers" looks like this in standard Axapta 3.0 SP3

select sysConfigTemp
where sysConfigTemp.id == licenseCodeNum(SysUsers);

The Id that should be selected is 10.

Problem: there are 2 records with ID 10! --> one with ConfigType = "AccessCodes" (that would be the correct one) and one with ConfigType = "ConfigurationKey"

Montag, März 20, 2006

Semicolon in methods: now I know why!

Today I found a very interesting entry in Max Belugin's blog. It explains why sometimes you have to put a semicolon in a method between the variable declarations and the first line of code. Finally, I understand know why! (Thanx Max!).
Here's the link: http://axcoder.blogspot.com/2006/03/magic-semicolon.html

Dienstag, März 14, 2006

Axapta 4.0 Layman Specification

No time to hesitate anymore: the Axapta 4.0 Layman's specification can be downloaded from numerous sites already, so here it is, too: things you can expect from Axapta 4.0. The doc is from december 2005.
I've put the file on some free storage sites, and I also apologize for any inconveniences for you when you download the file. I am sorry, but I do not have any webspace...
http://www.savefile.com/files/8987583
http://s5.simpleupload.de/fb875f6aa/MicrosoftDynamicsAX_LaymansSpec_1205.zip.html

Dienstag, Februar 21, 2006

Axapta Kernel Rollup 1: Compilation error

Due to a wrong file, you may get a compilation error with the kernel rollup. The file "AXSYSDE-AT.KTD", located in the Bin directory, has one error.

There is a blank line in the file causing the problem. Open fhe file with an editor and search for 1245. Directly above, there is a blank line, and above that line the text "Apostrophe (')". Delete the blank line and save the file using the same filename. Afterwards delete the file AXSYSDE-AT.KTI (Indexfile for the KTD) in the same directory and restart Axapta.

Mittwoch, Februar 15, 2006

Axapta Kernel Rollup 1: Field RECVERSION added to every table

The kernel rollup 1 adds a new field to the table COMMON and therefore, all Axapta tables get that new field.

It is called RECVERSION and rumours say that it is needed for the new Optimistic Concurrency checking (you can read about this in the previous blog entry). There is, however, no information about the field in the official release documents.

There is also the possibility that you will have to wait for a very long time after you first start your Axapta database with the new kernel rollup: as the system has to add the RECVERSION field to every table in Axapta, this may take quite some time for large tables.

Mittwoch, Jänner 25, 2006

Axapta 3.0 Kernel Rollup 1 released !!!

Finally, it has been done: Microsoft has released the so-called "Kernel Rollup 1" for Axapta 3.0.
With that kernel rollup, Microsoft adds the SQL 2005 compatibility for Axapta.

The highlights are:
• Compatibility with SQL Server 2005
• Optimistic Concurrency Checking for SQL Server 2000 and SQL Server 2005
• Enhanced Axapta SQL Server Tracing Utilities
• Increased SQL Query Performance
• AOS Enhanced Stability and Logging
• AOS Abort if Listener Thread Fails
• Enhanced Password Security (application update required)


If you want to know what is contained in the rollup, take a look here:
http://www.geocities.com/axaptafreak/Files/KR1_Fixlist.htm
http://www.geocities.com/axaptafreak/Files/KR1_Readme.doc

Donnerstag, Dezember 08, 2005

Slow ZipCodeLookup

If you have lots of zipcodes in your Zipcode table, you will get the problem that when you click on the lookup button of your zipcode field and it happens that the content of the zipcode field is one of the last records in your table, you will have to wait and wait and wait...

Reason: in the form ZipCodeLookup, method "run", the standard system uses the function "findrecord". Findrecord will go through the table and compare each record with the one you search! This is the same as if you would go down the form clicking each record.

The sad thing is: there's not much you can do about it. The only thing I thound was to replace the findrecord method with a filter.

Advantage: the lookup will show up immediately.
Disadvantage: the lookup form will only show records that match the zipcode from the previous form. Here's what you have to change in the method:



if (zipCodeCurrent)
{
//zipCode_ds.findRecord(zipCodeCurrent); // Ori
// Replace original line above with next line
zipCode_ds.query().dataSourceTable(tableNum(ZipCode)).addRange(fieldNum(ZipCode, ZipCode)).value(zipcodecurrent.ZipCode+".."); zipCode_ds.executeQuery();
}


Give it a try! And tell me what you think about it!

Mittwoch, Dezember 07, 2005

Axapta 3.0 and SQL 2005

To one of the earlier posts, Bernard added a comment which I will put here, as it contains very good information about the topic:

Microsoft is currently planning to make a kernel change to Microsoft Axapta 3.0 SP4, so that the solution will be able to support the Microsoft SQL Server 2005 database. We expect that the kernel change will be available through a General Distribution Release (GDR) in January 2006. Please see the timeline below for details on Microsoft SQL Server 2005 support.

  • January 2006: GDR release is planned to provide Microsoft SQL Server 2005 support for Microsoft Axapta 3.0 SP4. Microsoft Axapta 3.0 SP4 is not expected to support the new SQL Reporting Services and Report Builder

  • March 2006: Planned release for Microsoft Axapta 3.0 SP5, with support for Microsoft SQL Server 2005. Microsoft Axapta 3.0 SP5 is not expected to support the new SQL Reporting Services and Report Builder

  • June 2006: Planned release for Microsoft Dynamics AX in initial regions. Microsoft Dynamics AX is expected to support the Microsoft SQL Server 2005 database and SQL Reporting Services, including Report Builder

More information on the GDR kernel change will be announced as the release date draws closer.Microsoft Dynamics AX and SQL Server 2005 Aligned to Deliver Next Generation of Integrated Business Solutions

Integration with Microsoft SQL Server 2005 is key to delivering adaptable business solutions. Microsoft Dynamics AX, the next release of Microsoft Axapta, is being designed to take advantage of the business intelligence, data management, enhanced performance and high availability features of Microsoft SQL Server 2005.

Donnerstag, November 24, 2005

Some facts about AOS clusters

For your information:

  • When you have a SQL cluster for failover and the actual failover happens, the AOS will lose the connection to the SQL server and you have to restart the AOS service.

  • When you have an AOS cluster and you set it to start "On demand", it will not work. If the AOS instances are not running they will never start when clients try to connect. Sad but true. Maybe this will change when we get the new Dynamics Ax 4.0.

Mittwoch, November 23, 2005

Where Breakpoints are stored for Axapta

If you ever wondered where Axapta stores the breakpoints, here is the answer:
breakpoints are stored in the registry under the key

HKEY_CURRENT_USER\Software\Navision\Axapta\3.0

Here's a screenshot:

Mittwoch, November 16, 2005

AOS Cluster on one server

Although the time might be near that we do not see the AOS clusters as they are now anymore(4.0 is coming!), here are a few words about clustering AOS in Axapta 3.0:

Normally, you use quite a good server for the AOS, let's say a dual Xeon with 3Ghz. That is, of course, way too much to ever be used by the AOS. So, what can you do ?
--> Just make a second AOS instance on the same machine! Put both instances into the same AOS cluster et voila!

Why does that make sense, you might ask. Well, one AOS instance (which means one ax32serv.exe) can only address 2GB of memory. That will be reached sooner than you think! Starting at around 150-180 users you will get dangerously near the 2GB. If you put 2 AOS instances on the machine, both of them can take about 150 users, that makes 300 users total.

If you have more users, you must add a second server (which you already have, of course).

Donnerstag, November 03, 2005

SQL Server 2005 released!

The SQL Server 2005 is already available for download. If you have an MSDN subscription, you will find all the versions there (Developer, Enterprise, Standard, Workgroup).

Freitag, Oktober 21, 2005

Release Date of SQL Server 2005

Just in case you didn't know already:
the international release date of Microsoft SQL Server 2005 is November 7th (2005).

Here in Austria (where I live), the release date is November 22nd (2005) and it will be released together with Microsoft Visual Studio .NET 2005.

Unfortunately, I still do not know whether Axapta 3.0 will get a SQL 2005 connection or not..........

Montag, Oktober 17, 2005

The mystery of "index" vs. "index hint"

In the Axapta community, there is still a big confusion about the "index" and "index hint" statements used in connection with selects.

So, what is the Axapta kernel *really* doing:

Using "index": when you add the statement "index MyIndex", the Axapta kernel will add an "ORDER BY" with all the fields of the index.

Example: select * from InventTable index GroupItemIdx will generate the following SQL statement to the database:

SELECT A.ITEMGROUPID, A.ITEMID, A.ITEMNAME,.... FROM INVENTTABLE A ORDER BY A.ITEMGROUPID, A.ITEMID

The Index ItemGroupIdx of the InventTable exactly contains the two fields ItemGroupID and ItemId (in that order). Using "index", you still give the control of which index to use to the database optimizer. So, if the optimizer finds a better index to use, it will use it.

Using "index hint": when you add the statement "index hint MyIndex", the Axapta kernel will add a statement to instruct the database to use that index and no other one.

Example: select * from InventTable index hint GroupItemIdx will generate the following SQL statement to the database:

SELECT /*+ INDEX(A I_175GROUPITEMIDX) */ A.ITEMGROUPID, A.ITEMID, A.ITEMNAME,.... FROM INVENTTABLE A

Using "index hint", you take away the control of which index to use from the database optimizer. So, if there may be a better index, the database will not use it.

Conclusion:

Adding the "index" statement to an Axapta select, it does NOT mean that this index will be used by the database. What it DOES mean is that Axapta will send an "order by" to the database.

Adding the "index hint" statement to an Axapta select, it DOES mean that this index will be used by the database (and no other one).

This rule applies to both the MSSQL and Oracle databases.

Tip: On the Axapta 3.0 installation CD, you will find a document called "Performance enhancements using the Cost-Based optimizer" (file name: AX-300-TIP-024-v01.00-ENUS.doc) that will tell you some more things about Axapta and database optimizers.

Mittwoch, September 28, 2005

Axapta 4.0 Powerpoint

Here is a powerpoint file where you can get some ideas of what will be new in Axapta 4.0, or Microsoft Dynamics AX 4.0.

Click on the link and then on the powerpoint file. Unfortunately, Geocities doesn't let me put the direct link on the file here ?!?!?

http://www.geocities.com/axaptafreak/Files/Axapta_Blog_Downloads

Freitag, September 16, 2005

Axapta Blog now Microsoft related community

Today, the Axapta Blog site which you are reading now has been recognized as Microsoft related community.
From now on, it is listed here: http://www.microsoft.com/../../RelatedCommunitiesLanding.mspx

From time to time, it will also become a featured/highlighted community.

Mittwoch, September 07, 2005

Microsoft Axapta becomes Microsoft Dynamics AX

Hi
There were some rumours around the last days that Microsoft will change the name of it's ERP products and today I found the first info about the new name.

Microsoft will name every of their ERP products Microsoft Dynamics (followed by a short abbreviation of the "real"product, like AX for Axapta, GP for Great Plains.

So, get yourself acquainted to

Microsoft Dynamics AX

(BTW: the first info I found was from http://blogs.msdn.com/satyanadella/)

Freitag, August 19, 2005

Tip: How to renumber your RecId's

Every record in Axapta will have one unique identifier: the RecId.
The RecId will be unique per company and the system gets the next RecId number from the table SYSTEMSEQUENCES, field "NEXTVAL".
Sometimes Axapta also does not only take one number but will take more (I remember to have read that it can be up to 24 numbers)
The field is a signed integer in the database, so it can happen that you will swap from positive RecId's to negative RecId's. The range in which recid's are allocated is between 2.147.nnn.nnn and -2.147.nnn.nnn.
If you have "holes" in your RecId, it may then be interesting to renumber all RecId's, starting with the number 1 again. You can do this by running the script "Check Record Ids" in the menu Administration/Periodic/SQL Administration.
What will the script do?
--> It will create some new tables on the SQL database, collect all RecId numbers, assign new RecID number starting from one.
It will then check all Axapta tables if there are fields that are a reference to a RecId. If yes, the old RecId Reference will be replaced by the new one.
And here is also a very important trap: you must be sure that all your database fields that are a referenced RecID are extended from any type of RecId datatype.

The script itself will run quite fast. I was once using it on a 2.5 Axapta database with about 2GB of data and it was finished after about 1 hour.

Dienstag, August 09, 2005

Error: Form adjustments are gone after restarting AOS

Hi
You may have problems losing the users' form adjustments after the AOS has been restarted. Here is what I found out in an AOS cluster setup:

Setup:
2 different PC running the AOS service (Axapta 3.0SP3)
One of them hosts the SQL Server
Application files: on a third PC (Axapta 3.0SP3)

Both AOS instances point to the same database, the same application and are in the same AOS cluster.

For better understanding, client running on AOS 1 will be marked red in this blog.
For better understanding, client running on AOS 2 will be marked green in this blog.

Now, start Client pointing to AOS1, go to User/Options and delete all usage data.
Restart both AOS instances.
Now, we should have a pretty clean installation with no usage data.

Start client pointing to AOS1.
After that start client pointing to AOS2.

On Client AOS1, open the inventory form.

Original inventory form:

Make the Item name field smaller and the search name bigger.
After that the inventory form should look something like this:

Close the inventory form on client AOS1.
Open the inventory form on client AOS2.
The inventory form on client AOS2 still looks the same as the original, the changes done on AOS1 are not visible.
Close the inventory form on client AOS2.

Close application on client AOS1.
Close application on client AOS2.

Stop AOS instance on AOS1.
Stop AOS instance on AOS2.
Start AOS instance on AOS1.
Start AOS instance on AOS2.

Start the client AOS1.
Open the inventory form.
And here is how it looks like:
=looks like standard form

CHANGES ARE GONE !!!!!!!!!!!!!

Donnerstag, August 04, 2005

Axapta 3.0 and SQL2005

I was asking Microsoft if there will be a version of Axapta 3.0 that will work with SQL 2005.
Here is what I got today as answer:

"Right now what I can tell you is that Axapta 4.0 will run with MS SQL Server 2005.

We can not confirm that Axapta 3.0 will work with MS SQL Server 2005 at this point in time.

Technically it is possible to set up MS SQL Server 2005 so it operates like MS SQL Server 2000 in theory this makes it possible to use Axapta 3.0 with this database but we would need to make the tests necessary internally before we officially can make any confirmations."


What makes me curious about it is: SQL 2005 will be released in autumn 2005 (october?), Axapta 4.0 will be released in Q2/2006 (meaning July 2006).
So, there will be a time period of 6-8 months where Microsoft will have to tell new Axapta customers that they cannot use SQL2005.
Just imagine a new Axapta customer that wants to start running Axapta March 1st, 2006. He will not be able to run Axapta with SQL2005.

Don't you also think that's kind of strange from the sales point of view?

Montag, August 01, 2005

New hardware sizing guide by Microsoft

Hi
My sources tell me that Microsoft has released a document called "Axapta Hardware Guide For Environments Less Then 100 Users".

It's a word doc and will give you recommendations for

  • Axapta Database Server
  • Axapta Object Server (AOS)
  • Axapta Application Server
  • Axapta Enterprise Portal Server
  • Axapta Batch Server
  • Storage
concerning CPU's, memory, network, RAID system.
You should ask your Axapta partner for a copy of the document.

If you will have more that 100 users, you must enter some data in an Excel sheet which will then be processed by Microsoft (ask your Axapta partner).

Today, I also found in Harish Mohanbabu's Blog something about sizing. Check if out here: http://www.livejournal.com/~harish_m/

Donnerstag, Juli 28, 2005

Tip: How to find out where that error message comes from

Have you ever got an error or info message in Axapta saying "Cannot post...." and wanted to know where that error is coming from?
Here's a tip how to find out where the info message is thrown.

First, add a breakpoint in the Info class, method add:


After that, run the script that throws the error. As soon as the error message is thrown, the Axapta debugger will pop up:

At the lower part of the screenshot, you can see the call stack (if not, go to menu "View" and activate menu item "Call stack").
In the call stack, you can double-click on any line and the debugger will go back to it. Let's say we clock on the third line of the screenshot above. The debugger will take us to the Class TaxCov, method TaxLedgerCov:

You can see that the debugger put us exactly to the place where the error was thrown.

With the above method, it's pretty easy to find your way around the infos that Axapta gives you.

Mittwoch, Juli 27, 2005

ATTENTION: Be careful when upgrading to Axapta 3.0 SP4

When you upgrade your Axapta 3.0 SP1-3 to the latest Service Pack 4, make sure you import the Hotfix HF30SP4_011 first.
If you do not install it, the upgrade may run for an extremely long time (but: no data will be harmed).
You can get the hotfix from Partnerguide or your Axapta partner.

Dienstag, Juli 26, 2005

Axapta performance comparison Win 2003/2000

If you want to know whether it's better to run Axapta on Windows 2003 or Windows 2000, here is what Microsoft found out:

http://download.microsoft.com/...

Montag, Juli 25, 2005

How to set-up COM+ for Axapta correctly

Ever wondered why your COM connection was working while you were logged on to the PC and not working without being logged on?
Here's a short guideline how to set-up your COM+ correctly:
  1. You have to be logged on to the PC as a Local Administrator. Create a service account under which the COM+ should be running, this account must be local administrator on the PC. Log on with that account.
  2. In Axapta Config Utility: an Axapta User must be entered (on General Tab). This user must of course have the necessary rights in Axapta.
  3. In Axapta Config Utility: if the User has a Password, the Password must be entered (on COM Tab).
  4. Now (and only now) the COM+ component may be registered --> Config Utility, Tab “Business Connector”, Button “Register”. Of course you have to use the "Register COM+" option and the right dll file.
  5. In the Control Panel/Administration/Component Services: go to the Axapta COM+ Component (should be located under “Component Services / Computer / Workstation / COM+ applications / Navision Axapta Business Connector”.Open up the properties for the Axapta COM Connector. Go to the Identity Tab.Here, by default, the option “Interactive User” is chosen.Change this to: This User. Enter the user id (+domain) and password of the user you have logged in the PC (which should be the same as in 1., so this must be the local administrator).
If these guidelines are followed, the COM+ Axapta Connector will run even if nobody is actually logged on the PC. But be cautious: the COM+ connector will use the default Axapta configuration for the domain user that you entered in the component service. If you do not follow the 6 rules above, your COM+ might still not work.

Donnerstag, Juli 14, 2005

Testing AOS Latency

Wanted to know how big your AOS latency really is?
On many Axapta pages you can read that you should not test it with the "ping" command but with Axapta's built-in feature to test the latency. And so it works:

Start the system monitoring window by double-clicking the symbol as in the screenshot below(it's where area where the green arrow is displayed while Axapta is doing something).



In the System monitoring window, you can test the Latency by clicking on the “Test” button. Do that a couple of times and measure the times.
In the system monitoring window, also a Pseudo-simulation of a certain bandwidth and/or latency can be tested.

Enter a bandwidth and latency time, click on “Set as current” and your system will simulate that it runs over a connection with those settings.

There is also a startup-parameter for simulating the remote connection.

-bwsim=8000:50:1

to have a bandwidth of 8000 KBps (i.e. 64 kilo bit per sec)50 msecs latency 1 indicates that only data is penalized (not application objects)2 indicate include application object

Freitag, Juli 08, 2005

Data dictionary changes in 3-tier applications

If you have a 3-tier AOS application that is running on several AOS in a cluster, sometimes developing can be a pain.

Besides the old known trick of duplicating the menu items SysFlushAOD, SysFlushData and SysFlushDictionary and set the duplicates to run on server, here's another hint.

The AOS will know about each other's changes in the AOT in some minutes time. But this will not work if you make changes in the data dictionary.

Following example: in a table, you create a new index with several fields and synchronize it to the database.
After that, you enter Axapta on another AOS. What will you see in the index list for the table ?
--> The index you just created is called "UNKNOWN" (but has the fields inside).

What you have to do now is call the SysFlushDictionary menu item (the one that is running on server or even better both of them, but first the one running on server).
Et voilá. You will see the index in the AOT.

Mittwoch, Juli 06, 2005

Welcome

Welcome to the Axapta Blog Site.

This blog will deal with things around Axapta as well as provide some sample programming projects.