Ax2009 Event Processing Error

February 22, 2012 2 comments

I have a customer that gets a error every time the EventJobCUD-batch (Change Based Events) runs. They got the following error:

After some reseach I found out that when 2 fields are changed at the same time, you go several times through the listChangedFieldsEnumerator (location ClassesEventProcessorCUDprocessUpdate)

1
2
3
4
5
6
7
8
9
while (listChangedFieldsEnumerator.moveNext())
{
    // In this simple case we use the new and the original changed field value as
    // recorded at event detection time:
    [thisFieldId, changedFieldValue, origChangedFieldValue] = listChangedFieldsEnumerator.current();
 
    if (rule.AlertFieldId == thisFieldId)
        break;
}

The code underneed simulates the same situation in a small job:

1
2
3
4
5
6
7
8
9
static void Job5(Args _args)
{
    anytype any;
    ;
    any = ABC::A;
 
    // next line will throw a error
    any = BatchStatus::Canceled;
}

And here we get the basic same error “Error executing code: Wrong argument types in variable assignment.”

I modified the code so the anytype is assigned only when the field is correct:

1
2
3
4
5
6
7
8
9
10
11
12
while (listChangedFieldsEnumerator.moveNext())
{
    // In this simple case we use the new and the original changed field value as
    // recorded at event detection time:
    thisFieldId = conpeek(listChangedFieldsEnumerator.current(), 1);
 
    if (rule.AlertFieldId == thisFieldId)
    {
        [thisFieldId, changedFieldValue, origChangedFieldValue] = listChangedFieldsEnumerator.current();
        break;
    }
}

TechDays 2012 – Extending the reach of your Microsoft Dynamics AX Application with the next-gen tools

January 7, 2012 No comment

On February th 14th this year I am giving my first presentation on TechDays 🙂 You can view some details about my presentation on
http://www.microsoft.com/belux/techdays/2012/SessionDetail.aspx?sessionId=275

Convergence 2012 – Houston

November 18, 2011 No comment

I know I just got back from the technical conference bu I came through the announcement for the Convergence 2012 “A World Of Opportunity” in Houston (Texas) The conference will start on the 18th of march and will end on the 21nd. So try to clear your note between these dates.

Decisions Spring 2011 – june 14

March 30, 2011 No comment

Decisions Spring 2011 is a FREE virtual event from MSDynamicsWorld.com. It follows on the heels of the highly successful Decisions Fall 2010, which ran last November and had over 3,500 attendees.

Index vs Index hint

October 1, 2010 4 comments

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

Belgian Dynamics Community – Connection Day May September 30, 2010

September 17, 2010 No comment

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:

You can find more info or register on dynamicscom.be

Microsoft Dynamics Ax – Technical conference 2011 (Redmond)

August 7, 2010 2 comments

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

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

Belgian Dynamics Community – Connecttion Day May 27th 2010

May 20, 2010 No comment

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

The Agenda:

You can find more info or register on dynamicscom.be

Techdays 2010 @ Antwerp – Channel9

April 20, 2010 No comment

A few weeks ago I attended Techdays 2010. Now you all video’s ave been posted on Channel9.

Check them out on:
http://channel9.msdn.com/tags/TechDaysBelux/

Enjoy!

Belgian Dynamics Community Annual Event 2010

April 7, 2010 No comment

The Belgian Dynamics Community is organizing it’s annual event on the 22nd of April in San Marco Village.
On the agenda:

You can find more info or register on dynamicscom.be

Next Page »