Multisite activation within the upgrade process
Customers upgrading from Microsoft Dynamics AX 2009 will need to activate Multisite Inventory prior to upgrading to Microsoft Dynamics AX 2012. Some customers will have already setup their system for multisite in some of their companies and will be notified during the readiness checks that multisite must be activated in their remaining companies prior to upgrading. This activation is handled by the standard Multisite Activation Wizard found under Administration – Setup – Multisite activation.
Customers upgrading from Microsoft Dynamics AX 4.0 have no option within the core product to setup multisite inventory because that feature was not introduced yet. These customers will need to specify their multisite inventory settings as part of the data upgrade checklist. The validation message for this particular section is somewhat misleading, and the current Upgrade Guide PDF file has the wrong checklist menu item name.
There are three typical validation messages that can arise due to multisite activation, and two of the messages listed here require the user to go through the Configure site structure step within the Prepare application data for preprocessing section of the checklist. However, that checklist section doesn’t get activated right away which makes it seem like the user cannot take the right action.
The following message will appear if there are any custom tables in the system which use the InventDimID extended datatype.
- · Method Name: validateFullInventDimIdImpl
- · Message: Fields referencing the inventory dimensions (InventDim) table have been added. Multisite activation code is missing for the following fields:
- · Resolution: Add upgrade scripts
The resolution in this case of custom inventDimID fields is very generic and misleading. Clicking on the Details button will display a list of all the new fields and the tables that contain those fields, and would appear something like this:
The correct resolution to the issue with new custom dimensions is to inspect the dimension ID fields that are presented and determine if those records should have the InventDimID values changed so that they now include a default site. Once the decision is made for the fields, the next step is to customize the methods which list all of the InventDimID fields in the system in either a process list or an ignore list. In Microsoft Dynamics AX 4.0, the methods are found here:
- · Class Name: DEL_InventSiteCheckFieldRegistrator_Core
- · Method for processing: registerUpdateableFields
- · Method for ignoring: registerNotUpdateableFields
In Microsoft Dynamics AX 2009, the methods are found here:
- · Class Name: InventSiteActivateDimFieldsCheck
- · Method for processing: updateableFields
- · Method for ignoring: notUpdateableFields
In both cases, it is fairly easy to copy existing lines from the script and then add new lines at the end using the table name and field name for the custom InventDimID fields.
The two methods and messages which require the Configure site structure step are:
- · Method Name: validateSiteStructureDefined
- · Message: The site structure is not configured.
- · Method Name: validateFullSiteConfigCompleteness
- · Message: The site configuration is not complete.
Both of those validation errors recommend to the user to “Complete the Configure site structure item in the Pre-upgrade checklist.” In order to get the Configure site structure option enabled so this step can be completed, the user can press the Fix button in the bottom half of the window or wait until fixing all of the other validation errors and doing the steps in the Prepare application data section.
Filling out the Configure site structure window
This walkthrough continues to outline how to finish multisite activation during the upgrade process.
- 1. On Microsoft Dynamics AX 4.0, on the Prepare application data for upgrade checklist, the Configure site structure option is enabled, and the window can be opened (the menu option will not appear on Microsoft Dynamics AX 2009). On AX 2009, the option would need to be chosen prior to loading the upgrade XPO and can be found under Administration – Setup – System – Multisite activation.
- 2. The user must create at least one site for each company that will be used for defaulting, regardless of if the company has any data in it. This is done by clicking the New record button or typing Ctrl-N to create new records. More than one site can be created for each company, but the site IDs must be unique across all companies, which means that you cannot define site 01 for both DMO and DAT companies for example.
- 3. After creating the sites, switch to the Warehouses tab, and every warehouse must be assigned to one of the sites that were just created.
- 4. After assigning sites to all warehouses, switch to the Work center groups tab and assign every record a site.
- 5. Next, the user switches to the Defaults tab and has to assign a default site, warehouse and fallback warehouse for each company. The default warehouse will be created by the process and cannot currently exist in the company. It may be necessary to log in to some of the companies to create a warehouse to be able to use as the fallback warehouse in order to complete this window. If you do create a new default warehouse, you will need to close the Configure site structure window and re-open it to assign that default warehouse to a site on the Warehouses tab.
- 6. After the window is filled out, clicking the Set to ready for upgrade button will launch a Validate multisite configuration wizard. Press Start on the wizard and if any errors arise, print the report and correct the errors until all is successful.
Errors from loading upgradeax5.xpo before activating multi-site for AX 2009
If you carefully read the upgrade guide all the way through before you start the upgrade process, you may notice that it says to activate multi-site in AX2009 before loading the upgrade XPO or you will experience problems running the Multi-site activation wizard. That message isn’t very descriptive, and the guidance the wizard gives you isn’t of much help either – you get a message saying “The Multisite Activation Wizard is not up-to-date. Please run a best practice check to identify tables and fields for which activation scripts are missing.
To fix this problem caused by the UpgradeAX5.xpo, you can simply do the following steps:
- Open the AOT and navigate to Classes\InventSiteActivateDimFieldsCheck and find the method notUpdateableFields and open it in the script editor.
- You will see a whole lot of lines that look similar wiht the only difference being the table and field names. Go towards the bottom of the script and insert the following line BEFORE the line saying return set;
Then compile the script and re-run the wizard and resolve any other errors.
If the error still persists, then you will want to set a breakpoint in the method Classes\InventSiteActivateDimFieldsCheck\validateInventDimIdImplementation at the line in the middle that says ok=false; (line 36 in SP1 code) Then run the wizard again, and when the breakpoint hits, you can look at the variables sysDictTable and sysDictField to find out which table and fields need to be added to either the notUpdatableFields or updateableFields methods depending on if you want the inventDimID value to get the new site or not.