How to make a custom field mandatory on the BusinessPartner Entity?

In most cases the BusinessPartner needs to be extended with custom fields. Some of these fields have to be made mandatory (not null). If the custom field is made mandatory in the Entity it conflicts with the “Add User” workflow as the mandatory field will not be available on that screen.

How can we solve this ?

One of the solutions would be creating DefaultValue for custom fileds, so that when used in other workflows or datastructures it is always with some value.

Other solutions is to create DefaultSet for data structure which you use in context in a workflow, e.g. AddUser. In such solution you would have to create your own custom version of AddUser workflow to achive such behaviour.

The most difficult would be not to have fileds mandatory, so let them have “IsNull = True”, but then you MUST take care of all the validation in your BusinessLogic inside the application. This is not too suitable for complex solutions as you quickly can loose control over the whole project, especially if you do not take care of proper documentation.

Especially for extending the BusinessPartner entity you should follow the steps in the Documentation – Extending User Management where extension points are already defined.