Thursday, December 2, 2021

No print management settings are applicable so no document is produced

 Getting error message while printing report that  "No print management settings are applicable so no document is produced."



Solution:

Go to that module --> Setup > Forms > Form setup > General tab > Print management 

Right click and create new for all the reports you want to print.




Done.

Friday, July 2, 2021

Access D365 FO Local VM Environment URL from your machine

Today, we will see how we can access D365FO Local VM URL from your machine.

First Find the host file of your machine from the following path: C:\Windows\System32\drivers\etc

Your host file looks like:


Lets assume your local Environment IP address is 182.10.10.17

Once you find the host file, open the file and replace the local host IP address with the local environment IP address. After that, add a line having IP address with URL of local Environment at the bottom.

Your host file looks like:


Now, open internet explorer in your machine and enter the above URL. It worked!


Note: If there is any VPN required to access your local environment then make sure your VPN is connected.


:) 


Wednesday, June 30, 2021

Error importing database: Could not read schema model header information from package. The model version '3.6' is not supported

Error:

Error importing database: Could not read schema model header information from package. The model version '3.6' is not supported.




In order to fix this issue, you need to download and install the latest Data Tier Application Framework(18.2).

(Here is the link: https://www.microsoft.com/en-us/download/confirmation.aspx?id=58207)


After installed the latest Framework, open command prompt as administrator and write the below command:

C:\Program Files\Microsoft SQL Server\150\DAC\bin>SqlPackage.exe /Action:import /Sourcefile:"C:\temp\UATDataBasebackup.bacpac" /tsn:localhost /tdn:AxDB_New /p:CommandTimeout="0"


It worked.


Friday, May 21, 2021

Get Reference of Original Sales Order from Credit Note Sales Order using X++

If you create new sales order and create credit note of any previous sales order, then here is the way to find reference of previous sales order (invoice number) through newly created credit note sales order using x++.

InventTransOrigin::findByInventTransId(SalesLine::Find(this.SalesId).InventTransIdReturn).ReferenceId;


Note:
If you create a credit note simply by using the "Credit Note" button on the sales order form, Ax copies the previous invoice lines into the original sales order with a negative sign. In this case you do not need any additional reference to the original sales order as you are still using the same sales order.

Sunday, February 21, 2021

Import backpac file to Sql Server

Here are the steps below to imort the .bacpac file to the sql server.
Every time you import the .bacpac file, it will always create a new database on the sql server.

Step-1: Run command prompt as administrator and write the following command in it.

"C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\SqlPackage.exe" /Action:Import /SourceFile:"J:\AXDB_UAT.bacpac" /tsn:dev630a58c756-1  /tdn:SSProd /p:CommandTimeout="0"

Here:
tsn is target server name
tdn is target database name
New database created successfully here.

Step-2: Now rename previous database and set newly created database named as "AxDB" after stopped following services.

World wide web publishing service
Management Reporter 2012 process service
Microsoft Dynamics 365 Unified Operations: Batch Management Service
Microsoft Dynamics 365 Unified Operations: Data Import Export Framework Service                                                                                                      
                                                                                       OR

you can rename the database by using following commands:

Set database to single user 
ALTER DATABASE dbName
SET SINGLE_USER WITH ROLLBACK IMMEDIATE 

Rename database
ALTER DATABASE dbName MODIFY NAME = dbNewName

Set database back to multiuser
ALTER DATABASE dbName
SET MULTI_USER WITH ROLLBACK IMMEDIATE

Step-3: Start the following services  

World wide web publishing service
Management Reporter 2012 process service
Microsoft Dynamics 365 Unified Operations: Batch Management Service
Microsoft Dynamics 365 Unified Operations: Data Import Export Framework Service    

Step-4: Now run db sync using the below command

K:\> AosService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe -bindir "K:AosService\PackagesLocalDirectory" -metadatadir K:AosService\PackagesLocalDirectory -sqluser username  -sqlserver sqlservername  -sqldatabase AxDB -setupmode sync -syncmode fullall -isazuresql false -sqlpwd password

Done!



Friday, January 22, 2021

The required assembly 'Microsoft.Dynamics.Framework.Tools.ApplicationExplorer.dll' does not exists.

I was applying the latest Platform update to one of our internal server when I got this error.

Error:

"The required assembly 'Microsoft.Dynamics.Framework.Tools.ApplicationExplorer.dll' does not exists."




Solution:

To solve this error, just copied the dll file to the location where it popped up and that's it. Now, run the step again and the issue is resolved. 
(Hint: you can search this dll file in that drive where VS is installed).


Friday, January 8, 2021

Enable maintenance mode on local VM in D365FO

I found the following warning message while creating/activating new financial dimension on Local VM in d365 FO. For resolving this issue put environment on maintenance mode.


OR




In order to put environment in maintenance mode follow these steps:

1. Run Command prompt as administrator.

2. Execute this command

C:\AosService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir C:\AosService\PackagesLocalDirectory --bindir C:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser AOSUser --sqlpwd AOSWebSite@123 --setupmode maintenancemode --isinmaintenancemode true 


3. Restart AOS service from IIS

4. Now, Create/Activate financial dimension or  do the changes that you want. once you done. Revert back to environment in normal mode by using this command.

C:\AosService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir C:\AosService\PackagesLocalDirectory --bindir C:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser AOSUser --sqlpwd AOSWebSite@123 --setupmode maintenancemode --isinmaintenancemode false



Done :) 

Friday, January 1, 2021

Apply platform version update to Local VM of D365FO

Here are the following steps to update local VM of D365FO to latest version.

1. Go to LCS: https://lcs.dynamics.com/
2. Click on the Shared Asset Library button OR you can go to Asset Library of Project
3. Select Software deployable package and download latest update (you can also view details of package from right side).
4. After download move package to any folder (create new folder) of  C drive where local VM is setup
5. Make sure to unblock zip file from properties before extract deployable package to folder
6. After extract deployable package to folder open Command Prompt (cmd) with administrator in that folder.

Close all the instance of Visual Studio. Now run the following command one by one with sequence

i. AXUpdateInstaller.exe generate -runbookid="OneBoxDev" -topologyfile="DefaultTopologyData.xml" -servicemodelfile="DefaultServiceModelData.xml" -runbookfile="OneBoxDev-runbook.xml" 

ii. AXUpdateInstaller.exe import -runbookfile=OneBoxDev-runbook.xml (In this step it may ask Y/N, then press Y/y)

iii. AXUpdateInstaller.exe execute -runbookid=OneBoxDev

It will take approximatly 2 hours to complete 17 steps. Once its completed, open the environment and you will see that its updated. Enjoy :)