I was able to set a "recommendation" notification on my field as you can see on the left of the label on the first image and it works fine. But when actions are added, this error pops up and replaces the full field (Second image).
1.
2.
The error log shows "Cannot read property 'message' of undefined"
This is the code I'm using to generate the notification as per the documentation:
let temp: Function[] = null; var actionCollection: Xrm.actionsObject = { message: "See duplicate contacts?", actions: temp }; actionCollection.actions = [function () { console.log("works!"); }]; formContext.getControl("my_field").addNotification({ messages: ["Title"], notificationLevel: "RECOMMENDATION", uniqueId: "potential_duplicate_contact", actions: actionCollection });
I've tried multiple different variations of this code and always still the same error.
It seems like this feature is not completely done for the new UI? It also looks quite different from the old when it works. The documentation mentions it should show an "i" symbol and yet the symbol is a light-bulb. The icon is now on the left of the label instead of the field.