Showing posts from January, 2020

[Model-Driven Apps] Error code deciphering: ways to get the error description in Data Import Failure and Unified Interface Error Message Popup

When you encounter an error in Dynamics 365, the error is usually presented by an error code followed by a short error description that describes what went wrong. However, that is not always the case, there are instances where you will only be presented with an error code and no description of the error at all, and that is not helpful in identifying what had gone wrong.

Below are 2 scenarios I have encountered where I was only presented with an error code, followed by a couple of options on what to do and where you can get the description of the error codes pertaining to the scenarios.
Scenario 1 When importing data using Dynamics 365 Data Import Wizard, you will sometimes encounter an error for some of the records being imported. When you check the Import record, the system opens up the Import Source File form in Unified Interface and the description column is empty for the Failure records for some reason as in the screenshot below. With just an error code, it is not easy to figure o…

Find out how to include a link to the record (Record URL) when sending an email from Dynamics 365/CDS using flow

When sending a notification email to users that involves a review of a Dynamics 365/CDS record , it is always handy to include a direct link to the record itself within the notification email, so that the user can open the record directly from the email instead of doing a search in the system, etc.

We can previously do this easily in Dynamics 365 classic workflow as there is a Record Url (Dynamic) property for each entity which can be used to include a direct link to a Dynamics 365/CDS record when sending an email to the users. And that will allow the users to open the record directly from within the email itself by clicking on the link. However now, with the introduction of the model-driven apps concept and the format changes in Unified Interface, the Record Url (Dynamic) is no longer working like before as it is lacking the "appid" query string parameter.

There are still a few ways to provide a link to a record in an email by building a custom code solution or using string…

Find out why the Appointment Form refreshes upon record save and executionContext.getEventArgs().preventDefault() is not working

Issue 1: The Appointment Form refreshes upon record save I received a report recently from one of the customers that the system triggers a form refresh upon auto-save of an Appointment record. On rare occasions, unexpected form refresh due to auto-save causes some data loss. This usually happens when the user is entering a long text in the multiline textbox and the last few bits of the text were lost and no longer there when the form is refreshed.

Upon further investigation, we found out that it only happens in the Appointment form and the form refresh happens regardless of whether it is manual save or auto-save. The rest of the entity forms behave normally and lock the screen with white transparent overlay upon save event occurs. I checked out the behaviour of the Appointment form in the other environments and, strangely enough, it happens in most of the other Dynamics 365 environments but not in the model-driven app of my personal CDS environment.

Issue 2: executionContext.getEventAr…

[Model-Driven Apps] Learn how to sort Activities and control which fields to show on the Timeline Control in Unified Interface

One of the most common UI requests that I receive from the customers from time to time is to change the sorting order of the activities on the Timeline control (previously known as Social Pane in the legacy web client). By default, the Activities are sorted by Last Updated (modifiedon) date/time, but sometimes, that is not how the customers would like to see the records sorted.

Most of the time, users want to see the activities sorted by based on the activity date or Date Created (createdon) in descending order so that they will see the latest activity on top of the timeline. When the activity records are ordered by Last Updated, the old activity record goes up to the top when one of the users modify the old activity for some reasons (task completion, update description, etc.). It gets more confusing when the main record is assigned to one of the users and all related activities are also assigned to the same owner because of the cascading rule in the relationship. In this scenario, al…