How to throw error from commerce runtime to POS client - Song Nghia - Microsoft Dynamics Partner

Song Nghia - Microsoft Dynamics Partner

Song Nghia - Microsoft Dynamics Partner

Breaking

Saturday, April 25, 2020

How to throw error from commerce runtime to POS client

How to throw error from commerce runtime to POS client


Song Nghia - Technical Consultant

Hello, 

In this tutorial, I'll show you how to throw error, warning from CRT to POS Client

Step 1. In commerce runtime, use throw exception type: DataVaidationException like:

throw new DataValidationException(DataValidationErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToOpenShift, "Could not open shift. It could be this terminal did Z-Reading Report in this day");

 "Could not open shift. It could be this terminal did Z-Reading Report in this day" => it will show in event viewer


Step 2. You can get languages text id inside parameter from setup 1. Just f12 type of data validation exception to know id of languages text.

- After, go to languages text in d365, input what string you want to show in client. But you need to know standard alert will change, anyway, you have another choose to show alert to POS client.