Thursday, November 6, 2025

Open in Excel is not working on DEV BOX (Microsoft Dynamics 365 SCM)

When I tried to open in Excel on the on-premise dev environment, I encountered the following issue:

Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA' | Network client threw: Failed with status 400 | Attempted to reach: 


To resolve it, I had to use web version of Excel

Then you need to upload the file that was downloaded from Microsoft Dynamics 365 SCM

Expense Report Workflow Fails with X++ Exception: Cannot create a record in Alerts - event inbox data (EventInboxData)

Description

Recently I experienced the following issue:

Expense Report Workflow Fails with X++ Exception: Cannot create a record in Alerts - event inbox data (EventInboxData) 

Steps to review the error messages: 

1. Navigate to: Expense management > Process expense reports > All expense reports (Note: user must be linked to an employee record to see the data) 

2.Create expense report and Submit it.

3. After submitting to workflow, workflow will fail.

Stopped (error): X++ Exception: Cannot create a record in Alerts - event inbox data (EventInboxData). Inbox ID: 5637144754. The record already exists.


Resolution:

Error occurs because the workflow tries to create a duplicate record in the EventInboxData table using an Inbox ID that already exists.

Resolution: Delete the inactive records from the EventInboxData table.


Additional details were found here:

Exception: Cannot create a record in Alerts - event inbox data (EventInboxData) - Dynamics 365 for operations - v23

X++ Exception issue during Workflow creation

Exception has been thrown by the target of an invocation

I have recently experienced an issue on MS 10.0.45 in Microsoft Dynamics 365 for Supply Chain Management. While posting project invoice proposal for sales order, an error message is thrown "Exception has been thrown by the target of an invocation". This issue is not reproducible on MS 10.0.43, only on 10.0.45. I have validated the same scenario on clean/vanilla F&O on MS 10.0.45 and the same issue exists.  

After debugging this issue, it is showing an error:

System.MissingMethodException: 'Method not found: 'Void Microsoft.Dynamics.Commerce.Headquarters.Instrumentation.CommerceHQEventSource.EventWritePaymentsInvoiceEndUpdateStart(Int64, System.String, Boolean)'.'

This seems to be related to the following issue:

https://fix.lcs.dynamics.com/Issue/Details?bugId=855772&dbType=3&qc=d9cbf941a333782909abd105d654b4394a74f245c259530d6d9f650effac53fa

In our case the resolution was to swap dlls with newer version. By taking dlls from "Retail" model and replacing existing in "ApplicationSuite" model. 

Wednesday, January 15, 2025

D365 SCM Moving average: High-level overview

 Moving average is a costing method that works on average principle, meaning it calculates the average cost of inventory in stock. 

Average cost of each inventory item in stock is re-calculated after receiving inventory via purchase orders or any other inbound documents. So formula is the following:

The moving average cost = the total cost of items purchased / the number of items in stock.

Let's look at the example below:


With these transactions, the moving average cost at the 9/16/2024 was 100$, but at the 9/18/2024 was 120$.
Calculation for the 9/18/2024 = (10000+18000)/(100+150) = 112
If we sell the product, the cost of goods sold would be 112$.

In the scenarios above, the sales order was posted before posting of the invoice for purchase orders
So what will happen when invoice is posted for the purchase order and invoice price has been changed. 

What happens in D365 in this scenarios.
Purchase order transaction:
Let's charge 105.00 per unit for the item, not 100.00 as it was originally in the product receipt.


When we post invoice and invoice price is different, the following voucher will be created:
If the invoiced quantity is still on hand, the full difference between the invoiced amount and the receipt is recognized as an inventory cost.
If only part of the quantity is still on hand, the system performs a proportional calculation at the time of invoicing.

In our scenario, part of the quantity was sold already. The additional cost of 5.00 per unit cannot be related to the sales order, because the sales order is already costed when you receive the invoice for the purchased items. Therefore, the system performs a proportional calculation, and the expense of 400.00 ([105.00 - 100.00] × 80 units) is expensed on the Price difference for moving average account. So 400$ expensed and the remaining 100$ will be recognized as inventory cost and Financial cost that will be posted on transaction is 10100$ instead of 10500.

Moving average cost recalculation:
As soon as we post invoice, Cost is recalculated and now, it is not 112$, but 112.59$.
The calculation is the following: (10100+18000-8960) / (100+150-80) = 112.5882 

Sales order transaction
It does not update/recalculate issue transaction, it does not post adjustment transaction. 

Inventory close does not affect products that have moving average as the inventory model group, and it does not generate any settlements between the transactions. So it means that posted sales orders will stay unchanged. 

Moving average is typically a good fit for the following scenarios: 
- All units of the same product family carry the same cost
- There is no need to recalculate the inventory transactions to adjust the costs on outbound transactions. 
- There is no need in inventory closing
- Data entry on purchase orders is accurate and in timely manner and no significant difference between purchase price and invoice price. 


Sunday, October 27, 2024

Service management dispatch board issues

 I have been trying to resolve Dispatch board for a while and I managed to do it by doing all of the below:

- Create dispatch team and assign workers to dispatch team on the Employee page

- Create each worker as a Resource in the Production module, define the Type = Human resources and specify the calendar. 

- Resource calendar should match calendar in service management parameters

- Activities set to be created when stage changes from planning to in progress in the Service management parameters. Activity type is appointment

- Executed Synchronize resource capacity roll-ups batch job.

- Investigated if there are any issues for Resource Availability page in the Project management and accounting

- Investigated if Activity is created for service order.

- Assigned calendar on the Employee record.

Tuesday, May 7, 2024

Difference between Basic and Advanced warehousing in D365 SCM

Sometimes you need to make decision on whether you want to go with Basic or Advanced warehousing. In this blogpost I tried to summarize the difference between these 2 options. 

Take a look:


There are other considerations against Advance warehouse management in Microsoft Dynamics 365 SCM:

You might not want to use AWMS in the following situations:

  • don't have Warehouse locations
  • don't need to know where exactly your products are in your warehouse
  • small number of products and you know where they are
  • 3rd party provider is carrying the warehouse for your products
  • don't have mobile devices to perform warehousing operations

Things to consider when changing existing item from Basic to Advanced warehousing in D365 SCM

 1. First step is to remove storage dimension group on the Product level (not item level). Otherwise you will get the follwoing message:

The storage dimension group cannot be changed for the item. Remove the existing storage dimension group on the corresponding product before changing the item's storage dimension group.

2. You can only change the item which alreday has location dimension enabled. Otherwise you will get the following message:

You can only change the storage dimension group for items with an active location storage dimension.

If you don't have location dimension enabled, then you will need address this problem first and move your products to location enabled dimension.

You will need to perform the following according to the info shared here: How to change the Storage dimension group on items with existing Inventory transactions - Microsoft Dynamics 365 Blog

Note: I have tried the steps below and it worked. However I skipped inventory close procedure.
  1. Count inventory down to zero. You will need to temporarily remove any existing reservations, registrations, etc.
  2. Perform an Inventory close (Inventory management > Periodic > Closing and adjustment)
  3. After performing the inventory close, you can change the storage dimension group at the Released item level.
  4. Note that you will not be able to make this change unless the current session date is after the date of Inventory closing.

3. You can only change the item with storage dimensions that matches to the new storage dimensions in terms of inventory parameters. Otherwise you will get the following message:

The settings for active, blank receipt allowed, blank issue allowed, physical inventory, and financial inventory must match the settings of the current storage dimension group.

When you decide what is the best approach for changing your settings in the future, my recommendation is the following:

  • If you are considering Basic or Advanced warehousing, then start with the Basic and later on you will upgrade to the Advanced. You cannot downgrade it from Advanced to Basic. 
  • Start with active Location dimension enabled, it will simplify your life later when you decide to upgrade. For instance, you can use Warehouse=Location (1:1 values) if you don't have any locations yet.
  • Set up storage dimensions smart from the beginning so it does not require any change later. 

That's it!