2

I have a custom module with different classes. One of the classes is a Company class with several fields. enter image description here

After the creation of this class we needed to add extra fields. Some of them need to be required, but I'm not able to mark them required. Is this only possible on initial creation of the class and fields?

How can I make them required without needing to recreate the entire class?

Thanks in advance, Nele

Nele
  • 83
  • 5

1 Answers1

3

I tried on my own Kentico instance and it seems that when I uncheck the 'Can be customized' setting on the custom module class that I am able to change the required setting on the fields. Can you check if this solves your problem? I can't find anything about this option in the documentation yet.

It seems to me that the 'Can be customized' setting only applies to the Kentico classes.

A. van Hugten
  • 715
  • 5
  • 16
  • That's it. Thanks! – Nele Mar 24 '20 at 16:54
  • 1
    Reference in the documenation can be found [here](https://docs.kentico.com/k10/custom-development/creating-custom-modules/setting-the-type-information-for-module-classes/adding-references-between-classes). _Note: The extended class must be customizable . You cannot add the required reference field for classes that are not customizable._ – Tim Vermaelen Mar 24 '20 at 19:29