On the 27th of January Microsoft announced the new functionalities and updates that will be rolled out in Release Wave 1 2021. This is the information every Dynamics consultant is waiting for. What...
The new Lookup validation in Dynamics 365 version 9
Is it a bug that will be solved soon? No, this is how it works from now on!
To the experienced consultants, there is no need to explain that Lookup fields in Dynamics 365, refer to a related entity. For years now we are used to remove values in a Lookup field manually. In addition to that, Microsoft introduced the ‘Remove Value’ button in an earlier version of Dynamics 365, which is accessible from the “Lookup More Records” pop-up.
In version 9 however, Microsoft introduced several user interface modifications which also resulted in a behaviour change of the “Remove Value” button that resulted in the above mentioned error messages.
By using the ‘Remove Value’ button in version 9 the field is no longer emptied (e.g. NULL) but it becomes an empty array.
Our support ticket made some bells ring at Microsoft and they concluded that this is an unforeseen behaviour change.
Microsoft decided not to change this unplanned new behaviour since version 9, but instead will update the Microsoft documentation online. From now on, officially, we have to check every Lookup for both NULL and an empty array as per example below.
This is how it used to work: formContext.getAttribute(‘dp_location’).getValue() != null
This is how it works from now on: formContext.getAttribute(‘dp_location’).getValue() != null &&
formContext.getAttribute(‘dp_location’).getValue().length > 0
Of course you can wait until Microsoft publishes the new documentation set, but they stated that the update of the documentation will at least take 3 to 6 months.
So if you cannot wait that long and have any questions on this matter, send me an e-mail, and I will support you. With the best interest for our customers in mind, we as competitors should act like colleagues and support each other.
More relevant news
How to prepare your logistic execution in Cloud4Commodities30 November 2020
If you are a commodity trading company that ships goods worldwide, your back-office systems are filled with contracts signed with your counterparties such as suppliers, customers and shipping companie...