Posts

Showing posts from May, 2024

Importing and Restoring production database to DEV environment in D365FO using Bacpac File in D365 Finance and Operations

Image
  Copying a production database to a development environment is a common requirement for Dynamics 365 Finance and Operations (D365FO) developers. The process can be complex and requires careful planning and execution. In this blog, we will discuss how to copy a production database to a DEV environment using a .bacpac database file step by step. Go to Production /UAT Machine from where you want to take backup using LCS Download .bacpac file from the production database Go to LCS enviromert Asset library select Database backup tab and click on database you exported from production it will download into you PC in .bacpac format.Keep bacpac file in any drive Rename existing db in SQL management studio Suppose you have an AxDB database that you want to import. In this case, you need to change the name of the database to something like AxDB_old, using the below query executed in master. ALTER DATABASE AxDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE GO ALTER DATABASE AxDB MODIFY NAME = AxDB_O

Add sales order line to existing load through code X++

Selection of sales order lines static void Job1(Args _args) { WHSLoadPlanningWorkbenchServerForm loadPlanningWorkbenchServerForm = new WHSLoadPlanningWorkbenchServerForm(); WHSInventTransSumDim whsInventTransSumDim; counter c = 0; WHSLoadTable whsLoadTable = whsLoadTable::find("USMF-000004"); void addLine(InventTransId _inventTransId) { c++; select whsInventTransSumDim where whsInventTransSumDim.InventTransId == _inventTransId; loadPlanningWorkbenchServerForm.createTmpLoadLinesSalesLines( false, whsInventTransSumDim, c); } // Initialize parameter from Load loadPlanningWorkbenchServerForm.parmLoadPaysFreight( whsLoadTable.LoadPaysFreight); // Add lines using inventTransId addLine('012512'); addLine('012513'); // Add lines to load loadPlanningWorkbenchServerForm.addLoadLines(whsLoadTable); }   All sales order lines