Forum Discussion
Yoann_Maingon
9 years agoAccelerator I
Hi Carsten,
Setting a property as required impacts the Database configuration which has no idea of workflows/lifecycle, so it can't be adapted to certain states. What you need to do is the following:
- Client side : for painting in blue the fields, as it will not be the Out of the box required configuration, you will need to do it via CSS. Either by applying CSS through javascript or by applying a class on the field when it is required and having a CSS on the form which will set this class with a blue background.
- Server Side: you need to have a method OnBeforeUpdate which will check the state and then check for the mandatory fields (you could also have this verification on a lifecycle transition, which may make more sense). I have seen implémentations where you had an extra itemtype (or maybe a filtered list could work just fine) where you would store the information of required fields per state.