Publish-AXReport –ReportName * -id otwdynrs01AXSTDCU9 –servicesAOSname otwdynTS02 –servicesAOSWSDLPort 8106​
Publish-AXReport –ReportName * -id GWP-AX-01AXTEST –servicesAOSname gwp-ax-01 –servicesAOSWSDLPort 8101
Publish-AXReport –ReportName * -id GWP-AX-01AXPROD –servicesAOSname gwp-ax-01 –servicesAOSWSDLPort 8102
Publish-AXReport –ReportName * -id otwdynrs01AXBCH –servicesAOSname otwdynTS02 –servicesAOSWSDLPort 8107​
Publish-AXReport –ReportName * -id otwdynrs01AXALZSERV –servicesAOSname otwdynTS02 –servicesAOSWSDLPort 8108
Publish-AXReport –ReportName * -id otwdynrs01AXEPICTest –servicesAOSname otwdynTS01 –servicesAOSWSDLPort 8102


Publish-AXReport –ReportName * -id UATAOS02MSSQLSERVER –servicesAOSname UATAOS02–servicesAOSWSDLPort 8101

Test-AXReportServerConfiguration -Id AX2012R2_CalCons -ServicesAOSName Dynamics06 -ServicesAOSWSDLPort 8105 -ServicesFilePath “C:\AxConfig\CalibreAX2012R2usr.axc” -SkipReportServerAdminCheck Verbose
Install-AXReportInstanceExtensions -ReportServerInstanceName AX2012R2_CalCons -Credential dialoggroup\axdevserviceaccount -servicesAOSname Dynamics06 -servicesAOSWSDLPort 8105

Install-AXReportInstanceExtensions -ReportServerInstanceName AXSSS -Credential dialoggroup\axdevserviceaccount -servicesAOSname otwdynTS02 -servicesAOSWSDLPort 8102
Install-AXReportInstanceExtensions -ReportServerInstanceName AXPROD -Credential gwp\svc_bcproxy -servicesAOSname gwp-ax-01 -servicesAOSWSDLPort 8102
Install-AXReportInstanceExtensions -ReportServerInstanceName AXBCH -Credential dialoggroup\axdevserviceaccount -servicesAOSname otwdynTS02 -servicesAOSWSDLPort 8107
Install-AXReportInstanceExtensions –ReportServerInstanceName AXSSS -Credential dialoggroup\axdevserviceaccount
Install-AXReportInstanceExtensions -ReportServerInstanceName AXALZ -Credential dialoggroup\AXDevServiceAccount -servicesAOSname otwdynTS02 -servicesAOSWSDLPort 8108

Install-AXReportInstanceExtensions -ReportServerInstanceName AXEPICTEST -Credential dialoggroup\axdevserviceaccount -servicesAOSname otwdynTS01 -servicesAOSWSDLPort 8102


Install-AXReportInstanceExtensions -ReportServerInstanceName REPORTSPRESTONHIRE -Credential dialoggroup\axdevserviceaccount -servicesAOSname DYNAMICS08 -servicesAOSWSDLPort 8103
Install-AXReportInstanceExtensions -ReportServerInstanceName AXCQR -Credential dialoggroup\axdevserviceaccount -servicesAOSname OTWDYNTS01 -servicesAOSWSDLPort 8103

Publish-AXReport –ReportName * -id dynamics08REPORTSPRESTON –servicesAOSname dynamics08 –servicesAOSWSDLPort 8103
Publish-AXReport –ReportName * -id otwdynts01REPORTSCQR –servicesAOSname OTWDYNTS01 –servicesAOSWSDLPort 8103
<CodeGroup class=”FirstMatchCodeGroup” version=”1″ PermissionSetName=”Execution” Description=”This code group grants MyComputer code Execution permission.”>


Install-AXReportInstanceExtensions –ReportServerInstanceName AXSTDCU9 -Credential dialoggroup\AxDevServiceAccount -ServicesFilePath “C:\Program Files\Microsoft SQL Server\MSRS12.AXSTDCU9\Reporting Services\ReportServer\bin\Microsoft.Dynamics.AX.ReportConfiguration.axc”


Uninstall-AXModel -Model <String> [-Config <String> ] [-Database <String> ] [-Details] [-Layer <String> ] [-ManifestFile <String> ] [-NoPrompt] [-Server <String> ] [ <CommonParameters>]

Uninstall-AXModel -Model DLG -Config AX2012r3SLC -Details -NoPrompt


axbuild.exe xppcompileall /s=04 /altbin=”C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin” /log:”C:\Temp\AXCompileLogs” /verbose

axbuild.exe xppcompileall /s=06 /altbin=”C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin” /log:”C:\Temp\AxCompileLogsSTDCU9″ /verbose


Get-AXModelManifest -File DLG.model -Config AX2012r3STDcu9

Get-AXModelManifest -Model DLG -Config AX2012r3STDcu9 -XML

Edit-AXModelManifest -Model DLG -Config AX2012r3STDcu9 -ManifestProperty “Version =”
Edit-AXModelManifest -Model DLG -Config AX2012r3SLC -ManifestProperty “Version =”

Edit-AXModelManifest -Model DLG -Config AX2012r3GWT -ManifestProperty “Version =″

axbuild.exe xppcompileall /s=09 /altbin=”C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin” /log:”C:\Temp\AXCompileLogs” /verbose

“C:\Program Files\Microsoft Dynamics AX\60\Server\Ax2012r3STD\bin\AXUtil.exe” import /config:Ax2012R3Epic /file:”C:\AxModels\STD\DLG.axmodel” /conflict:push
“C:\Program Files\Microsoft Dynamics AX\60\Server\Ax2012r3STD\bin\AXUtil.exe” export /config:AX2012R3STD /model:”CEC” /file:”C:\AxModels\EPIC\Models\CEC.axmodel”

“C:\Program Files\Microsoft Dynamics AX\60\Server\Ax2012r3SLC\bin\AXUtil.exe” delete /config:AX2012R3SLC /model:TmpModel

AX7: Deploy All SSRS reports manually
Open AX7 VM / azure server
Open windows powershell in administrator mode.
execute below comments

Set-ExecutionsPolicy Unrestricted
For Local environment

For Azure environment
J:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1 -PackageInstallLocation “J:\AosService\PackagesLocalDirectory”


J:\AOSService\PackagesLocalDirectory\Bin>ModelUtil.exe -delete -metadatastorepath=”J:\AOSService\PackagesLocalDirectory” -modelname=”LSC” <press Enter>
Are you sure you want to delete model Application suite VAR model? (Y/N)
To Query D365 Records


Power BI setup in D365

Use the link in the given order.

File Upload in D365

Credit to this below blog

Ability to work with local files and folders in the new cloud based AX7 (which we used to do with WinAPI class methods) is now depreciated. Instead, we have some new options for working with files on the cloud environment like Azure BLOB storage, temporary storage and Sharepoint. Since the new interface is web based, we have ability to upload files into various new storage options and download those using urls, instead of direct interaction with disks, files and folders.

Now let’s have a look at those new file upload methods starting from a single application which we upload a file to temporary storage and after upload finishes, display its file path and download it back.

class fileInteractionTest

public static void main(Args _args)
FileUploadTemporaryStorageResult result;

result = File::GetFileFromUser(classStr(FileUploadTemporaryStorageStrategy));</pre>
if(result && result.getUploadStatus())
new Browser().navigate(result.getDownloadUrl());



This job will display user a dialog to upload a file and with our chosen upload strategy, will storage it to our new temporary storage option, Azure temporary blob storage.  Methods will return us an url to our uploaded file instead of a temporary filename inside Windows\temp folder :


Files stored in Azure temporary blob storage are erased on each system restart, disk expansion or whenever Azure wants. So don’t upload any files here unless you want to use them immediately.

The file upload strategy class simply defines the target we want to upload our file into. There are many different options which we can send our uploaded file. If you select FileUploadStrategyBase class in AOT and click view hierarchy you can get an overview of those :


In this blog we will only use the temporary storage option.

The file upload operation returns us a FileUploadResult class to control the result of our file upload. There are different result classes for different file upload strategies. In our upload strategy, we can query the download url which points to our file in temporary storage. To download it, we call the navigate method of Browser class which redirects us to the download url.

What if we want to edit the file or want to save it to database? For that purpose, AX7 uses .NET stream classes. You can open the file by downloading the file URL into a MemoryStream class and use either the legacy .NET stream methods like ReadByte() and Write(), or .NET StreamReader and StreamWriter classes for easier operation. The openResult() method in our Result class downloads the file from the upload url into a .NET MemoryStream class.

Now let’s create a more advanced example, this time we will use the form file upload control on a form that will get an XML file from the user and place it into the database. Later in another blog we will use another form to read and download those XML files.

We create our upload form like this and set the desired upload strategy for our form upload control :


And create a simple table which saves the uploaded xml document per date :


To get our uploaded file result, we override the OnUploadCompleted() method our form upload control :

public class fileUploadForm extends FormRun
//Tip : Do not use URL EDT type for blob storage URLs, these can be longer than URL datatype!
str fileurl;

class FileUpload1
public void OnUploadCompleted()
FileUploadTemporaryStorageResult result = this.getFileUploadResult() as FileUploadTemporaryStorageResult;


if(result && result.getUploadStatus())
fileurl = result.getDownloadUrl();

using(System.IO.MemoryStream stream = result.openResult() as System.IO.MemoryStream)
using(System.IO.StreamReader sreader = new System.IO.StreamReader(stream, System.Text.Encoding::UTF8, true))
XML filexml;
TestXMLTable testXml;

filexml = sreader.ReadToEnd();


testxml.uploaddate = DateTimeUtil::utcNow();
testXml.xml = filexml;

class DownloadImmediately
public void clicked()
new Browser().navigate(fileurl);


Note that we are using the new AX7 ‘using’ keyword working with the .NET streams and stream readers in order to dispose them immediately after they are out of scope.
By clicking the download immediately button, we can directly download our file from the temporary storage url returned by the upload result.

In the next blog, we are going to create another example form to browse the XML files from DB using different methods and attaching them as files into the records with new AX7 document management.

You can download the test project used in this blog from GitHub link below:


Visual studio not allowing to switch user

Resolve this problem by deleting the registry key under


Debugging Tactics for Visual Studio

Some useful debugging tactics from The Visual Studio Blog

7 More Lesser-known Debugging Tactics for Visual Studio

1. Edit the value of a variable without changing code

2. Look at values throughout recursive function calls

3. Show parameter values in the Call Stack

4. Break on a function without manually finding the source

5. Flag threads and run all of them to the same location

6. Switch active threads to see the context

7. Stop when a variable value changes in C++ code


workflow editor not opening in ax 7 /D365O

You can have a look at below Video link

Video Link

As shown in the video,

Run below command by opening Command prompt as ‘Administrator’


rundll32 dfshim CleanOnlineAppCache




Windows Management instrument error on SQL Server 2017 installation


I found the script here. Just copy it in .BAT file & run.


net stop winmgmt /y


cd %systemroot%\system32\wbem

if exist %systemroot%\system32\wbem\repository.old rmdir /s /q


rename %systemroot%\system32\wbem\repository repository.old

regsvr32 /s %systemroot%\system32\scecli.dll

regsvr32 /s %systemroot%\system32\userenv.dll

mofcomp cimwin32.mof

mofcomp cimwin32.mfl

mofcomp rsop.mof

mofcomp rsop.mfl

for /f %%s in (‘dir /b *.dll’) do regsvr32 /s %%s

for /f %%s in (‘dir /b *.mof’) do mofcomp %%s

for /f %%s in (‘dir /b *.mfl’) do mofcomp %%s


%systemroot%\system32\wbem\winmgmt /clearadap

%systemroot%\system32\wbem\winmgmt /kill

%systemroot%\system32\wbem\winmgmt /unregserver

%systemroot%\system32\wbem\winmgmt /regserver

%systemroot%\system32\wbem\winmgmt /resyncperf

net stop winmgmt /y

if exist %systemroot\system32\wbem\repository.old rmdir /s /q


rename %systemroot\system32\wbem\repository repository.old

regsvr32 -s %systemroot%\system32\scecli.dll

regsvr32 -s %systemroot%\system32\userenv.dll

mofcomp %systemroot%\system32\wbem\cimwin32.mof

mofcomp %systemroot%\system32\wbem\cimwin32.mfl

mofcomp %systemroot%\system32\wbem\rsop.mof

mofcomp %systemroot%\system32\wbem\rsop.mfl

for /f %%s in (‘dir /b *.dll’) do regsvr32 /s %%s

for /f %%s in (‘dir /b *.mof’) do mofcomp %%s

for /f %%s in (‘dir /b *.mfl’) do mofcomp %%s

net start winmgmt

%systemroot%\system32\wbem\wmiprvse /regserver