2

I want to give my users the ability to create an "employee of" relationship between an individual employee and an individual employer; where someone works for an individual rather than an organisation.

Is there a way to create a relationship that allows selection of either organizations OR individuals or must this be implemented as two separate relationship types?

3 Answers 3

3

You can set the 'contact type' of a Relationship to be All Contact Types

2

I tried what @petednz-fuzion suggested (@tanbog I did this in the database setting contact_type_b to NULL for the relationship in table civicrm_relationship_type). Good news is: I can now add a relationship employer/employee individual to individual. Bad news: As @erikh-civicoop suggested I tested some basic functionality afterwards and the following two issues were enough for me to state that this is probably not the way to meet this need: 1. In the contact summary screen you won't see the employer when it is an idividual and you won't be able to add the relationship from there as you can only search for organizations. 2. In the default report "Current Employers" the empoyer's name will only show content for organizations. So probably a second relationship would be better then...

1

As @petednz stated you can change the contact types a relationship works for. (System>Customize Data and Screens>Relationshiptypes).

There is some core functionality involved in the employer relationship (linked to the employer in the contact summary). I would recommend you test that as well to make sure it behaves as you want. If it throws any issues, you can create a new relationship type for your purposes?

1
  • The parameters of the 'employee of' relationship are locked. Is there a way to change them to allow all contact types? I could make my own new relationship yes it's just my users are likely to then want me to remove the 'employee of' from the UI entirely to avoid confusion.
    – tanbog
    Oct 29, 2018 at 22:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.