AX2012R2 – What company am I in?

Found a strange occurrence in the system today when moving between the main system and the development environment. The status bar shows the company that is active. However when doing some testing I noticed that if the companies in the two environments are different, when I change from the development environment to the client, the system will report the change of company.

However if I change from the client the development environment, assuming it is already open, it will not do the same, keeping the active company as the one from the client, even through the status bar in the development environment states otherwise.

So be careful if you are running classes or jobs that update data in a multi company environment. You should always code the required company into the class or job to ensure it cannot be accidentally run from the wrong company.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s