Did you set [%CurrentDateTime%]
as the default value for endDate
and no default value for startDate
by any chance? If so, this would explain the error: when the object is created Mendix tries to set the default value for endDate
, but this fails because it doesn't comply to your validation rule (a date value is never greater or equal to an empty
value).
IMO, validation rules should only be checked on a commit, but currently they are also checked when changing an object (including when Mendix tries to set default values for attributes). To solve the error, you could either validate using a before commit microflow instead of validation rules on the entity, or remove the default values for the attributes on the entity.
Problably you are setting an autonumber attribute.
Alexander, Chris, thanks. I set [%CurrentDateTime%] for both endDate and startDate. I have no autonumber attribute. It is not the behaviour expected.