Interview Questions

Tuesday, July 29, 2014

Dirty tricks on Ax License


In the
world of Ax, Licenses play a major role. To continue with our day to day work,
at times, we will need to do some dirty work too …

This
entry is result of those dirty works . Let
me go through the following topics:

  • Copying License from one data
    base to another
  • Removing License of a
    particular module
  • Solving Sync issues after
    removing license
  • Working without licenses!!!



Copying License

<<Applicable when you already have this license of a
module in another database and dont have a License file>>

In Ax, Licenses are stored in Database. The tables used as data
source in License Information form are:

1. SysLicenseCodeSort
2. SysConfig

I didn’t do any micro research here, but, quickly jumped into
conclusion that License is stored only these tables as no other tables are
declared or used. 

Euphoria.. !!  Copying these tables from another database will solve the
purpose :)

So, everything we need to do now is:

  1. Backup and truncate records from
    Destination DB
  2. Copy
    records from Licensed DB. This can be by:

  1. Exporting and importing records
    • Export records using export
      tool.
    • Import the exported records.

Or

  1. Cross database query.
    • Insert into
      <<Destination DB>>.<<Tablename>> (Select * from
      <<LicensedDB>>.<<Tablename>>)

PS: But, after doing this, I found that original developer
license is gone. When I imported basic license again, I had all modules


Removing License of a module:

Sometimes, developer environment may have full license and
production environment may not. To simulate environment, we will have to remove
License of few modules.

This can be done as follows: (But, before doing this, make sure
that you have a backup of your database.)

  1. Click Administration > Setup > System > License information
  2. Goto Modules Tab
  3. Select
    the module and delete the LicenseCode
  4. Save and
    synchronize when prompted.

Solving Synchronization issues

Sometimes, after removing the license, synchronization will
fail. This is because a field, having configuration key of a removed module, is
part of an unique index.

For example, if Warehouse Management License is removed from a
DB having Demo data, we will get synchronization error on InventDim Table.

This is because, field WMSPalletId is a part of Warehouse
Management configuration Key. When that license is removed, this field gets
disabled and indexed set of fields will now have duplicate records.

There are many ways to solve this, like

  1. Make the index as non Unique. or
  2. Delete
    duplicate records from Database using a set of Sql queries. or
  3. In the
    EDT of this field, remove the configuration key. How? See below section.

Working without License

It is not impossible to

  • remove a configuration key
    from an EDTor field
  • Make a configuration
    independent of License
  • Make entire Ax License free!!

Follow these steps:

  1. Export the EDT or Config key to an
    xpo file
  2. Remove
    the config key or license in the xpo
  3. Import
    the file back.

To make Ax License free, export all configuration keys into an
xpo and edit it 

If this is first time and you dont have license to open AOT,
then you can import the xpo from command prompt as

Ax32.exe -startupcmd=autorun_"<<xml file locating the
xpo>>"

No comments:

Post a Comment