Posts Tagged ‘changecompany’

Get your Intercompany CustAccount

Monday, September 29th, 2008

Ever wonder if there is an easy way to find out what customer account a sales company has at the production company?

This might not be an easy way, but it is one way to do it:

(more…)

Intercompany with buf2buf

Wednesday, November 7th, 2007

When discussing the “Basics of changecompany” we copied table records from one company to another through X++ code. Using buf2buf makes this is a lot easier.

Buf2buf is used to copy one recordbuffer to another:

       buf2buf(Common _from, Common _to)

If we apply this to the code we used in “Basics of changecompany” we get:
(more…)

Basics of changecompany

Tuesday, November 6th, 2007

The command changecompany is used to switch between companies in you Dynamics Ax environment through X++ code. This is the basics:

  // We are now in company FO
  changecompany("FO1")
  {
      // We are now in company FO1.
  }
  // Back in company FO

Let’s say that we start out in company FO and want to copy some data from company FO to company FO1. This is one way to do it.
(more…)