Blank Company field in Contact record potentially cause error

Problem

Error when user attemp to change contact record's company from Blank/Null to an other company, or a new company.

Error message:

Error:Apex trigger OnePlace.trContactBF caused an unexpected exception, contact your administrator: OnePlace.trContactBF: execution of BeforeUpdate caused by: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Please select a Contact, Company, Matter, User, Function, Publication or Pipeline to have this relationship (TO) side.: []: (OnePlace)

Cause:

The blank company field is the reason of the issue. System generate a "Former Employee of" relationship for every change of company action. As the system unable to associate the relationship with a Company record, hence, the error.

Solution

Please contact your OnePlace administrator when the error occurs.

For users who have administrator permission.

To temporary bypass the error to change specific contact record's company field.
i) Click on Setup to open up the administrator panel.
ii) Go to Create under the Build section. Select Objects.
iii) Open the Relationship object.
iv) Go to Validation Rules section.
v) Deactivate following Rules
- To Blank
- From Blank
Please remember to re-activate above rules once the change is made.