Posts

Start or Stop All D365 F&O Services on a Dev VM with One PowerShell Script

Why you need one script to start and stop D365 F&O services If you develop on a Dynamics 365 Finance & Operations (D365 F&O) one-box dev VM, you start and stop the same services every week. This post gives you one PowerShell script that does it in a single command: pass 1 to start every D365 F&O service, or 0 (the default) to stop them all. You need to stop the D365 F&O services more often than you think: Before a database restore or refresh. Microsoft's own steps stop the AOSService app pool and the Batch Management Service before replacing AxDB ( Microsoft Learn ). Before deleting a model. Microsoft Learn says to stop the AOS and Batch services first, then run a full database sync after restarting ( Microsoft Learn ). When a build fails with locked DLLs in the PackagesLocalDirectory bin folder. To free RAM and CPU when you only need Visual Studio, or before shutting the VM down. The script covers IIS and the AOSService app pool (the AOS), DynamicsAx...

Mastering Container Functions in X++: A Developer's Guide

Hello All, When working with Microsoft Dynamics 365 Finance and Operations, developers often deal with the X++ language, a powerful object-oriented language tailored for enterprise solutions. One of the key data structures in X++ is the container — a versatile object that can store a sequence of values of various data types.  In this blog post, we'll walk through the essential container runtime functions in X++ that every developer should know, complete with examples and simplified explanations.  1. Removing Items: conDel Need to remove one or more elements from a container? The conDel() function helps you trim down your container by specifying a starting position and the number of items to delete. Syntax: container conDel(container original, int startIndex, int count); Example: container myContainer = ["Apple", "Banana", "Cherry"]; myContainer = conDel(myContainer, 2, 2);  // Removes "Banana" and "Cherry"   2. Searching for Va...

Increase Your Storage in Azure Dev VM to fix disk size issue while D365 F&O DB restore.

Image
Hi All, When attempting to transfer a Microsoft Dynamics 365 Finance and Operations (D365 F&O) Tier 2 or higher environment database to your development machine, you may encounter a common hurdle: insufficient disk space within your development Virtual Machine (VM) due to the significant growth in the size of D365 F&O databases over time. Typically, the bacpac file downloaded from Lifecycle Services (LCS) is highly compressed. This blog post outlines a step-by-step guide to effectively address this scenario and manage your disk space during the restoration of a Dynamics 365 F&O database from a Tier 2 or higher environment. Scenario: Imagine you've imported the bacpac file into your database, and as time progresses, you find yourself running low on disk space, requiring additional room to complete the database restoration. Solution: Follow these steps to expand the available space on your drive by swapping it from another drive where memory is free: Step 1: Begin by ope...

Move Database from Dynamics 365 F&O Tier 2 to Dev Environment

Hello everyone, Today, I'm sharing a concise guide on transferring data from your Microsoft Dynamics 365 F&O Tier 2 environment to your development machine. This blog will focus on the steps for importing a bacpac file that you've prepared on your Lifecycle Services (LCS) platform. To Restore a .bacpac File in Your Microsoft Dynamics 365 F&O Dev VM: Step 1: Download the bacpac file from LCS to your Dev environment. Step 2: If this is your first time importing a bacpac file into your VM, download the "Windows .NET 6" zip file and extract it to the C:\Temp folder. You can find it here: Download Link Step 3: Locate the Sqlpackage.exe file within the extracted folder. Step 4: Open a Command Prompt in Administrator mode and navigate to the folder containing Sqlpackage.exe. Step 5: Execute the following command to import the bacpac file: SqlPackage.exe /Action:Import /TargetServerName:"localhost" /TargetDatabaseName:"Testbackup" /TargetTrustServ...

Identify Tables Impacted During Business Operations in D365 & Axapta

Image
Hello All, Welcome to my latest blog post where I will be sharing my insights on identifying tables impacted during business operations. Oftentimes, interviewers ask for a list of tables or classes involved in specific business operations, such as PO confirmation, receiving, or invoicing. Or there is the requirement to perform impact analyses on adding custom columns to standard tables. Although there might not be any straightforward approach to identifying the above points this blog will help you to an extent. This exercise comprises two stages. In the first stage, we trace the process from the front end, and in the second stage, we analyze the trace to identify the tables impacted.   To avoid unnecessary overheads in the trace, please note the following: 1.       Take the trace in the Dev machine where you are the only user logged in. 2.       Ensure there are no integrations or API calls being executed on the machine. 3...

Simplifying the Connection of Your Dev VM to Tier 2 Environment in D365D

Image
 Hi All, Welcome to my latest blog post where I'll be discussing common challenges developers face when connecting their Dev VM to the Tier 2 Environment in D365. Typically, manually replacing specific tags in the web.config file can be a tedious and error-prone process. However, I have created a utility that automates this task, simplifying the process of connecting your Dev VM to the Tier 2 Environment. To get started, simply download the utility from the link provided in your Dev VM and follow the steps below. Click here to download the file Step-by-Step Instructions: Step 1: Generate database credentials from LCS, please don't hesitate to contact me through comments if you feel any difficulty to generate Database credentials. I'll be happy to address your concerns and may even create a separate blog post on the topic. It should be like the one below. Step 2: Download the utility executable file to your Development VM and double-click it to execute. Step 3: On the comman...

Create Custom Services in D365 F&O and Test using Postman Part-2

Image
 Hello Friends, Welcome back to the final part i.e. Part 2 of the series. For those who have missed the first part please refer to the below link https://vikasaxaptandd365fno.blogspot.com/2022/12/create-cusotm-services-in-d365-f-and.html So let's start with the Testing !!! To test any Services/Data entity for D365 we are required to generate the Access Token. An access token is used the authenticate the user from Azure Active Directory. To make the authentication happen(i.e. Generate Access Token), we need to create a new App registration in the Azure portal. Follow the below steps to Create App Registration, add the same in D365 F&O and Connect using Postman.  1) Log in to Azure Portal https://portal.azure.com/#home 2) Search for App Registration 3) Create New App Registrations. 4) Provide some logical name for the App registration, Select "Supported Account Type" as required. Enter the URI and Click on the Register button. 5) New app will be registered...

Popular posts from this blog

SSRS Report error "The parameter panel layout for this report contains more parameters than total cells available D365" Finance and Operation

Simplifying the Connection of Your Dev VM to Tier 2 Environment in D365D

Mastering Container Functions in X++: A Developer's Guide