Monday, June 25, 2018

D365FO - Importing License File (ISV/VAR Add-on) via deployable package into QA/Prod

Because we do not have the same access in QA/Production/Build as we do in the lower level environments installing a license file is a bit different compared to development, test, stage (any environment within the supplemental scope)

In order to deploy this license file to production or QA we need to do the following. It is good to note that creating this package is not environment specific. Meaning you can create this package on dev and deploy to prod or create on test and push it is QA or stage. It is just a set of pre-defined scripts which is why it doesn’t matter.

Any AOS server:

Windows Explorer > \AOSService\PackagesLocalDirectory\Bin\CustomDeployablePackage
*usually C:\AOSService\PackagesLocalDirectory\Bin\CustomDeployablePackage or on the K-drive*



In here you will find the file ImportISVLicense.zip

Make a copy of this zip file and open it up. Then browse to the following location: ImportISVLicense.zip\AosService\Scripts\License

Copy the license .txt file into this folder and save the zip.


NOTE: During my first try of this I extracted the zip, copied the file into it and zipped it back up. However during the next steps below that allow the license file to be applied I received an error message saying it has an invalid HotfixInstallationInfo.xml even though I did not touch this file. If you modify the zip directly LCS has no issues with the file so I would recommend not extracting the zip file but rather just using the default one as a template and copy the zip somewhere else and make the change there.

It is also good to note that you can put multiple license files in single package. But it is good note that it will import from alphabetically


LCS > Open the AX project in which you wish to apply the license to which in this case is the QA environment which means we need to open the implementation project. Then go to Asset library


Go to software deployable package > Click on the add button and fill out the info regarding the file being uploaded and select our zip file we created in the steps above

You will need to give it a couple of minutes before the "valid" box has a check mark. You will not be able to apply this file until the instance is marked as valid.

Once the instance has been marked as valid we need to apply it to the system.

Go to full details page for the specific environment we need to apply this to and click on the Maintain option > Apply updates




From this window we need to choose the asset we just created and click on apply



After this the system will process the request and trigger emails whenever the process starts and completes.

Whenever you open the main page you will also see the current status of the import itself as well.


From this point we can choose to either A. Do nothing and allow people to test or B. can mark the asset was as release candidate.

You should now be able to log back onto the environment  and see that the isv solution is now there

And that the license configuration page now has the license checked.


Friday, June 22, 2018

D365FO - OneBox Default account information

It seems like you have to dig through the internet to find onebox login information so I thought I would put it on here to make it easily find-able.

OneBox default windows login:

Login: local\Administrator
Password: pass@word1

OneBox SQL login
Login: axdbadmin   
Password: AOSWebSite@123


I will add more as I run across the need for different accounts that are associated with the OneBox.

D365FO - Maintenance mode / Importing License File (ISV/VAR Add-on License import)

In AX 2012 in order to import a license file for an ISV or VAR add-on all you simply did was go to your license management form and click on import, select the file and run a full sync. In D365FO this has changed dramatically.


In D365FO there is now only a license configuration which is available via  System administration > Setup > License configuration however you will notice that the data is read-only.

(This form is read-only unless the system is in the maintenance mode. Maintenance mode can be enabled in this environment by running maintenance job from LCS, or using Deployment.Setup tool locally)

In order to change this from read-only to modifiable we need to put the system in maintenance mode. We do this by opening the command prompt (cmd.exe)

change the dir to your local \AosService\PackagesLocalDirectory\Bin\ folder:

>cd C:\AosService\PackagesLocalDirectory\Bin\

Put the service into maintenance mode:

>Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir C:\AosService\PackagesLocalDirectory --bindir C:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser [sql login] --sqlpwd [sqlpassword] --setupmode maintenancemode --isinmaintenancemode true

Reset IIS/Cycle the AOS> IISRESET


The system should now be in maintenance mode so we can import the file

via the cmd.exe prompt run the following

Import license file:
> Microsoft.Dynamics.AX.Deployment.Setup.exe --setupmode importlicensefile --metadatadir C:\AOSService\PackagesLocalDirectory --bindir C:\AOSService\PackagesLocalDirectory --sqlserver . --sqldatabase AxDB --sqluser [sql login] --sqlpwd [sql password] --licensefilename C:\licensefolder\license2018.txt


In D365FO you should now be able to open  System administration > Setup > License configuration and not see the read-only warning. You should see the name of the license that was import and you should be able to enable the configuration for the new license file.





Turn off maintenance mode

> Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir C:\AosService\PackagesLocalDirectory --bindir C:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser [sql login] --sqlpwd [sqlpassword] --setupmode maintenancemode --isinmaintenancemode false



Reset IIS/Cycle the AOS: > iisreset


Note:
The example above was for importing it into a onebox. Depending on the environment you may need to change the drive from C:\* to K:\*
For this exe we list the metadatadir as the bin folder as well
The sqluser & sqlpassword will be different for each enviornment
The database name may be different depending on the environment


Reference:  D365FO - Importing License File (ISV/VAR Add-on) via deployable package into QA/Prod (importing license via deployable package)

D365FO - Execute a job/runnable class outside of visual studio

In AX 2012 you had access to the AOT to run a job in non-prod and in production. However because you can no longer access the server itself nor visual studio which is now the AOT you may need to run a custom job created outside of visual studio. In order to do this we can run the following url

[D365FO main URL]/?cmp=[company]&mi=SysClassRunner&cls=[job/runnable class name]

OneBox Example:
https://usnconeboxax1aos.cloud.onebox.dynamics.com/?cmp=[company]&mi=SysClassRunner&cls=[job/runnable class name]
Example: https://usnconeboxax1aos.cloud.onebox.dynamics.com/?cmp=MyCompany&mi=SysClassRunner&cls=MyCustomJob

D365FO - Table Browser via web browser

In previous versions of AX you had a table browser in the AOT which allowed you to view the data, modify or delete it while executing any table methods that may have been associated with it. In D365 you can no longer access the table browser the same way as you not longer have access to the AOT in production. 

In non-production environment's and production environment you can use the following URL to open a web based table browser

You can access it via environment url/?mi=SysTableBrowser&tableName=[tablename]&cmp=[company]

Example: https://environment.cloudax.dynamics.com/?mi=SysTableBrowser&tableName=Hcmworker&cmp=MHC

Where HcmWorker is the table and the company is MHC



In non-production environments which you have access to visual studio you can also access the web table browser by right clicking on a table and choosing "Open table browser"




It is good to note that when using the visual studio method to open the table browser the company that is on your user account will be defaulted to