Calendar widget : new event reference causes error
Hi, I started a new application and would like to use the Calendar widget. The application has a simple model The calendar widget is placed inside a data view with type Employee, which is selected from a list. This is how the calendar widget is configured : As soon as the "new event reference" is set the calendar generates errors (in chrome): 1. when the calendar is clicked to add a new event a popup with a general error appears (but no message in the console log) 2. the on click event to edit an existing event doesn't work anymore and a log message in the console appears : Caused by: java.lang.IllegalArgumentException: requirement failed: Reference 'Employee.Event_Employee' only accepts ids of type 'Employee.Employee' (Id '[MendixIdentifier:: id=14355223812243459 objectType=Employee.Event entityID=51]' is not allowed). What is wrong with this configuration? Any help is welcome. Olivier
A couple of questions:
When you get the new event error, have you looked in the Chrome developer console to see if there are any errors there?
This seems like a very straightforward configuration, is there any reason you are not using XPath constraint for your data source? I am not sure if this will resolve your errors, but it may have some impact.
*** Edit ***
It looks like you have the microflow with context object set as your datasource here. It could be that your data source microflow (Employees.GetEntities) is not returning the correct events and/or employee. I would recommend checking out that microflow to ensure you are returning an 'Employee' object. It looks like there is an empty object based on the error message.