My 2p about ERP Solutions, Information Worker Solutions and other software products (mainly Microsoft Dynamics AX and Microsoft SharePoint).

11 October 2012

Unwanted changecompany due to refresh SysOperationProgress class

by Patrik Luca 0 comments

Tag



Problem: unexpected changecompany

I was faced with a problem in Dynamics AX 2012, where sometimes an unexpected changecompany happened in a process. Sometimes it occurred, sometimes it didn’t, making it difficult to simulate it.

Solution

The cause of the problem was the SysOperationProgress class. This class can be used to inform the user about status, operation and progress of the system. It was initiated before my changecompany call and closed after it. When the progress bar created by the SysOperationProgress class was refreshed during code execution within my changecompany class, a call is done by X++ to the Docu class. This triggers also a changecompany due my original legal entity. Hence some of my code within my changecompany call was executed in the company to which I did the change, some was done in the company I originated from. And this not all of the time, as it only happened if a refresh happened of my progress bar within the changecompany call. I removed the SysOperationProgress and my problem was solved.

Comments 0 comments

Patrik Luca, Ieper, BELGIUM
Feel free to use or spread all of the content on my blog. In return, linking back to my blog would be greatly appreciated. All my posts and articles are provided "AS IS" with no warranties.

Subscribe feeds via e-mail
Subscribe in your preferred RSS reader

Subscribe feeds rss Most Read Entries

Subscribe feeds rss Recent Entries

Categories

Recommended Books


Subscribe feeds rss Recent Comments

This Blog is part of the U Comment I Follow movement in blogosphere. Means the comment field of this blog is made DOFOLLOW. Spam wont be tolerated.

Live Traffic Feed

Recent Visitors

Blog Archive

My Blog List

Followers

Guest Links