Friday 4 November 2011

Ax 2009 disk full error

Hi there

This problem only seems to occur on 64-bit operating systems and it can be very tricky to pin down the cause

It occurs on both Terminal servers and Citrix Servers seemingly at random, we've noticed that the most consistent way to reproduce it (for this implementation at least) is by trying to generate a Customer Account Statement, but it can occur also occur when using Select Criteria, trying to generate a report, or when trying to view the permissions tree in a user group


The problem







Cannot create temporary file: C:\Program Files (x86)\Microsoft Dynamics AX\50\Client\appl\standard\tmp\$tmp001303e8.$.

The disk may be full.


Which is strange since the disk isn't full on the AOS server or the Citrix/Terminal server

There is a workaround which is to run the Ax client as an Administrator but that can be a major security flaw and isn't a long term solution


The Cause

There's a registry setting which tries to create a temporary sub-directory each time a user connects to a Terminal/Citrix server.

The problem is that when this temporary sub-directory gets created, it doesn't appear that the Ax client has access to it

So while the user may have the correct access to the %temp% directory within their Citrix/Terminal server user profile, they don't have access to the %temp%\1 or %temp%\27 or %temp%\942 sub-directory (the exact number varies and is rarely the same)


The Solution

The solution is to set the registry on the terminal server to not create these sub-directories within the temp folder and just to use the main %temp% directory instead

How do you do that? Well I'm glad you asked, all it takes is a little registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]

"PerSessionTempDir"=dword:00000000

This change needs to be made in the registry on all the Citrix/Terminal servers that are used to connect to Ax

Here's a handy KB article with a bit more information about these keys

http://support.microsoft.com/kb/243215

Couldn't find this solution posted anywhere else on the internet so it looks like this is a first. Hurrah!

Thanks to Microsoft Support for their help in troubleshooting this tricky issue

Wednesday 5 May 2010

Learning X++

Hi there

I've got an interview lined up next week that will require an X++ test. Now I've never even compiled an X++ program (except when you setup a test system but that's not really development) so I've been trying to learn using code snippets, blogs and MSDN

This is because I don't have access to a working virtual machine or test system since I'm not currently working with a Ax customer or partner. As far as I know, there aren't any resources available for solo students to study X++ on their own without paying for an expensive training course

Alas like my old Java teacher used to say "Programming is not a spectator sport". There's only so much that can be learned without having access to a virtual machine to play with or some kind of development system. Still this is better than nothing

So I've been going through the posts on the Issues Concerning X++ blog starting with the earliest post and this is what the past two hours of study have revealed:
You can find the original uncommented code sample and post here



static void Job2(Args _args)
{
System.Type typeOfByte;
System.Array arrayOfByte;
int arrayOfByteLength = 8;
int i;
;

typeOfByte = System.Type::GetType("System.Byte");
// Calls the static method GetType which is part of the
// System.Type class using the parameter System.Byte to
// instantiate the typeOfByte object to be a byte variable

arrayOfByte = System.Array::CreateInstance( typeOfByte, arrayOfByteLength );
// Initialising an array of bytes
// with 8 cells

for( i = 0; i < arrayOfByteLength; ++i )
{
arrayOfByte.SetValue( System.Convert::ToByte(i), i );
// SetValue takes Object - need to cast explicitely
}
// Go through the array and set the value in each
// cell to be the same as it's index number
// BUT cast the value from the initial integer
// value to a byte object

for( i = 0; i < arrayOfByteLength; ++i )
{
print ClrInterop::getAnyTypeForObject( arrayOfByte.GetValue( i ) );
// Displays the contents of the arrayOfByte using
// a Common Language Runtime static method that
// converts a CLR object to the X++ object type
// anytype. The anytype object's main use is as
// a return type so this is exactly the kind of
// situation it should be used
}

pause;
// Halts the execution of this job, presumably
// so that you can read the results of the
// above print statement
}


If you spot any mistakes then please feel free to point them out, like I said before, I'm still learning and in a odd kind of way

P.S. Writing and formatting this post so that it looks right took longer than the study time of the code snippet!

Wednesday 15 October 2008

v3 Copy-paste crash bug

There is a bug in the kernel of Ax version 3 which exists in all service packs

This bug causes the Ax session to crash when the user attempts to paste "corrupt" text

Usually it occurs when using a particularly slow connection, when the user copies the text, it isn't copied properly and nothing is pasted when the user attempts to paste to any other program (e.g. notepad)

However when the user attempts to paste the text into Ax, their session crashes and they have to restart Ax and log in again, developers tell me this is especially frustrating for them

Microsoft have released a hotfix however to correct this problem, and it should be available from Partnersource right now

You can thank me for getting that bug fixed, it took about 3 months to track down the source and get a useable crash report to MS for their developers fix it

Troubleshooting rare bugs, it's like trying to catch a fly with chopsticks ;)

Thursday 15 May 2008

Dynamics Ax - Task Recorder

This is a free add-on for Ax that allows you to record whatever you're doing in Ax (forms that open, user input and screenshots) and automatically create documentation for you

So far I've been using it to produce Microsoft Word documents that will become part of a user manual for a bespoke Ax module

This is the first time we've actually managed to get it to work! Whenever we've tried it in the past it just wasn't useable
So for anyone else who's had problems with it, try the latest version, after having used it for several weeks without problems, I can recommend it

It's a LOT easier than taking hundreds of screenshots and cutting/pasting them into a word document

It's by no means perfect though, and there is still a fair amount of editing required before the document that it spews out is presentable enough to be of any use to an end-user, but it does make life easier

You can download it from here (requires partnersource login)

There's a brief but succinct description here at the axaptapedia too

Enjoy

Friday 25 April 2008

Dynamics Ax 3.0 to 4.0 migration tool released

Hi there

Microsoft have updated an existing migration tool so that it now can assist in migrating from Axapta 3.0 to Dynamics Ax 4.0

Link (requires login to partnersource)

It's called XAL2AX, probably because Dynamics Ax was called Concord XAL many years ago when Damgaard still owned it

In fact Ax has had several different names and owners over the years, but that's another story which I'll explain in a separate post one day

Happy migrating!

Friday 11 April 2008

Inside Dynamics Ax 4.0 ebook for FREE!

Microsoft have made this book available for free download (although like most ebooks, it cannot be printed)

It's supposed to be quite good from what I've heard

Not sure of why Microsoft have done this but why look a gift horse in the mouth?

Grab it while it's hot!

Wednesday 26 March 2008

Dynamics Ax 2009 VPC available

Hi there

Microsoft have released a Virtual PC image of Dynamics Ax 2009 (the new name for Dynamics Ax version 5)

You can download it and user manuals from here
(requires partnersource access)

It's almost 7 GB in total and is designed to work on a single laptop/PC (as opposed to a server)

Enjoy