Are you still using the Dynamics 365 mobile app to access your Dynamics environment from your mobile? This is now also possible with the mobile “Power Apps” app from Microsoft. Originally ...
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 manage expected operational cost versus the actual costs received16 October 2020
In an earlier blogpost (How to manage additional cost coming with a trade deal) we highlight the automatic calculation of expected operational cost during trade capture. Within this post we highl...