Early versions of AX had isolated data between companies using the dataAreaId field and allowed data to be accessed by developers using the crosscompany and changecompany statements. With newer versions of AX more data is being shared between companies, such as the global address book. This has called for a new level of data isolation... Microsofts answer: Partitions. Partitions are one level above companies. A partition can have multiple companies underneath it and each company can only belong to one partition.
The partition to log in to can be defined on the client config or the user settings. Once the AX client has been opened, the current partition cannot be changed. To change partitions the user must exit the client and then open the client with a different config file. There is also no crosspartition or changepartition statements in the ax code making it very difficult to query data from a different partition.
If only it were this easy...
If you are creating a new table that you need to share a table between all partitions then you can set the "SystemTable" property to Yes then set "SaveDataPerCompany" to No and "SaveDataPerPartition" to No. The data in the table will be the same for all partitions.
Cross partition selects
The example below shows how to select data from a different partition. Since it will get a table buffer for records in a different partition, the display methods for the table will also need to be run on the other partition. The code will run in CIL so you will need to do an incremental CIL compile before running.
// This method executes the query on the other partition and returns the data
static container queryPartition(container _c)
QueryRun qr = new QueryRun(new Query(_c));
ret += [buf2Con(qr.getNo(1))];
// This method can execute table display methods on other partitions