Skip to main content

Posts

What is Entire Table Caching?

 Entire table caching means that Dynamics 365 F&O keeps a full copy of the table in memory (cache) instead of loading records one by one from the database. So, when the table is used, the system does not go to the database every time . It simply reads the data from the in-memory cache , which is much faster. When is Entire Table Caching used? It is best for: Small tables Parameter or setup tables Tables where data does not change very often Example: A table that stores configuration settings (like number sequences or default parameters) is perfect for entire table caching. Why use Entire Table Caching? Improves performance Reduces database calls Faster read operations
Recent posts

Difference Between a Temp Table and a Container

  1. Data Access & Speed Temp Table: You can create indexes , so data retrieval is faster , especially with large datasets. Works like a normal SQL table, just temporary. Container: Data is stored in a sequential list . No indexing → slower when working with many records. 2. Structure & Flexibility Temp Table: Can hold multiple fields , different data types, and behaves like a real table. Supports filtering, sorting, and joins. Container: Simple structure, stores values in a linear list. No ability to sort or join directly. 3. Passing to Methods Temp Table: Passed by reference → method receives the same table buffer. Efficient for large data. Container: Passed by value → container is copied every time it is passed. Slower and uses more memory for large data. 4. Use Cases Use Temp Table when: You need to handle multiple records . You need fast lookup using indexes . You want to sort,...

Difference Between refresh(), reread(), research(), and executeQuery()

  Difference Between refresh(), reread(), research(), and executeQuery() 1. refresh() It only refreshes the data already loaded on the form . It does not go to the database. It simply updates the form UI with the data that is already in the form cache. Example: If you change a field value in code and want the form to immediately show the updated value, use refresh() . 2. reread() It reads the current record again from the database . It does not refresh the grid/form automatically. It is used when you want the latest version of only the current record , not the whole list. Example: If another process updated the same record in the background and you want to load the latest values from DB, use reread() . 3. research() It re-runs the form’s existing query on the datasource. It keeps the existing filters, sorting, and ranges . It refreshes the data on the form based on the same query that is already applied. Example: If new records were ...

πŸ’‘ X++ Tip: Keep the Same Record Selected After Refresh in a Form or Data Source

 When you refresh a form data source in Dynamics AX or Dynamics 365 for Finance and Operations, the current selection is often lost — the cursor jumps back to the first record. This can be frustrating, especially if you want the user to remain on the same record after an update or refresh. Here’s a simple and reliable way to restore the cursor to the same record after the data source is refreshed. 🧩 Scenario Suppose we have a form displaying records from MyTable . When we refresh the data source — for example, after updating a field or calling executeQuery() — we want the form to return to the same record the user was viewing before the refresh. ✅ Solution: Use ds.cursor() We can achieve this using a record buffer and the cursor() method of the data source. public void refreshDataSource() { MyTable myTableRec; // buffer to store current record // Store the current record myTableRec = MyTable_ds.cursor(); // Refresh the data source MyTable_ds.r...

Find InventDimId, SiteId, and Warehouse by ItemId in x++

  πŸ”ΉFind InventDimId, SiteId, and Warehouse by ItemId static void FindInventDimByItemId(Args _args) { InventTable inventTable; InventDim inventDim; ItemId itemId = "A0001"; // πŸ”Έ Replace with your item ID InventOrderSetupType setupType = InventOrderSetupType::Sales; // πŸ”Έ Example setup type // Select item from InventTable select firstOnly inventTable where inventTable.ItemId == itemId; if (inventTable) { // Initialize the InventDim record inventDim.clear(); // πŸ”Ή Get Site (InventSiteId) based on item setup inventDim.InventSiteId = inventTable.inventItemOrderSetupMap(setupType) .inventSiteId(inventDim.InventSiteId, inventTable); // πŸ”Ή Get Warehouse (InventLocationId) inventDim.InventLocationId = inventTable.inventItemOrderSetupMap( setupType, InventDim::findOrCreate(inventDim).InventDimId) .inventLocationId(inventDim...

πŸ”§ How to Apply the Latest Service Update to a D365FO Development VM

Keeping your Dynamics 365 Finance and Operations (D365FO) development environment up to date ensures that your system remains compatible with the latest features, fixes, and security improvements. In this guide, we’ll walk through how to apply a Service Update (CU) to a local development virtual machine (VM) step by step. πŸ“₯ Step 1 – Download the Service Update Package Log in to LCS (Lifecycle Services) . Go to Shared Asset Library → Software Deployable Package . Find and select the Service Update you want to apply. Click Download — the file is usually 5–6 GB , so this might take some time. Once downloaded: Right-click the ZIP file → Properties → Unblock , then click OK . Extract it to a non-user folder (e.g., C:\Altitudo\10_0_23 ). ⚠️ Avoid extracting to your Desktop or Downloads folder. 🧩 Step 2 – Collect Topology Configuration Data Inside the extracted folder, locate DefaultTopologyData.xml . This file defines the VM name and installed components for ...

πŸ”„ Manual Database Synchronization in Dynamics 365 Finance & Operations (On-Premises)

 When working with Dynamics 365 Finance and Operations (on-premises) , there are times when you need to manually synchronize the application database (AXDB) with your metadata. This is especially common after deploying new models, applying hotfixes, or troubleshooting schema mismatches. In this guide, we’ll walk through the manual sync process , how to test SQL connectivity , and a quick troubleshooting checklist to ensure smooth execution. πŸš€ Running the Manual Sync Command The sync is triggered using the Microsoft.Dynamics.AX.Deployment.Setup.exe tool. Below is an example command for a full tables and views sync : C:\ProgramData\SF\SBAOS02\Fabric\work\Applications\AXSFType_App83\AXSF.Code.1.0.20251009185555\bin\Microsoft.Dynamics.AX.Deployment.Setup.exe ^ --setupmode sync ^ --syncmode FullTablesAndViews ^ --metadatadir C:\ProgramData\SF\SBAOS02\Fabric\work\Applications\AXSFType_App83\AXSF.Code.1.0.20251009185555\Packages ^ --bindir C:\ProgramData\SF\SBAOS02\Fabric\work\Applicat...