Wednesday, February 22, 2023

System.InvalidOperationException Cannot stop DynamicsAxBatch service on computer Dynamics 365 for finance and operations

Basically, DynamicsAXBatch services is in stopping mode and stuck.

Open CMD with run as administrator and run the following command and to get PID

sc queryex DynamicsAxBatch

And kill the Process Id

Below is the query to kill the process:

taskkill /f /pid 5352

Now start the service again

Friday, February 17, 2023

How to move one ADO project from one organization into another ADO project into another organization

Go to your ADO link from where you want the backup of all the tasks

In my case Link

In my case I am taking the "DynamicsProject" as shown in the picture below

open the project, go to board -> queries as shown in the picture below

click on "New query", you will see a window like below

In that, click on Run query, as shown below

now all the tasks, issues, bugs will be shown in the window below

Now click on "Save query", a new popup will be shown, now enter the name of the query, in my case I am taking "TestQuery"

Click on the "Column option" as shown in the picture below

a new window will pop up like below

Now click on add a column and select the column,
and in the same way keep on adding the column and add all the columns in it

Now click on "Export to CSV", now save the CSV file in the desktop

Please Note: You need to do some changes in the CSV file as written below
            * Remove the ID column from the CSV file as this will be set by next ADO project itself
            * Following fields are read only and can't be uploaded via CSV, so remove them: ID, attached file count, authorized date, board column done, comment count, node name, related link count, remote link count, rev, revised date, state change date, team project, watermark, parent, board column, closed date, activated date, state, reason, changed date, created date, activated by, resolved date, resolved reason, resolved by, closed by.

            * Also change the email address for fileds like assigned to, in the CSV as the email address in one organization must be different for the different user in the other organization. for example: in 1st organization email address is and in second it will be Use find and replace in Excel to change all at once.

Now go to the second project in any organization, where you want to import the work items, bugs and all (In my case I am going to "Dynamics project Two" in the same organization)

Now go to the project and the go to board > work item

now click on "Import Work Items"

Now it will open new window like below

from this choose the CSV file and click on Import as shown below

Now you will see a window like below, just click on Save items


Thursday, February 9, 2023

Working with Macros in X++ | Hardcode

Basic Macro: A macro is a variable known to the precompiler. The variable can have a value that is a sequence of characters, but it is not required to have a value.





Query Macros: Query macros are defined a little differently as compared to a basic macro

Class Macro


    public static void main(Args _args)



        select * from custTable



        select * from vendTable



         where %1.AccountNum == %2

     &&    %1.Currency   == %3








Tuesday, February 7, 2023

How to create a new organization and new project in AzureDevOps or ADO

Go to this link

You will see a screen like below

Click on "Create new organization" and a new window will open like this

click continue

Next page will open like the one below, 
fill in the name of your azure DevOps organization and enter that captcha

Now click continue

A new organization is ready now [In my case organization name: DynamicsCommunity101]

Now it will ask to create a new project, and a screen like the one below will open

Now click on Create project, it will take a few seconds to create the project

Once the project is created, you will see a screen like below

Now we can add the members, work items, and what not according to our needs...😉