Answers.Body: <p>It looks like it's been this way since 2015. What version did you upgrade from?</p>
  <p><a href="https://github.com/civicrm/civicrm-core/pull/6806/commits/e7e572807e8ec866d63584f280a7a78d3d9c738a" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/6806/commits/e7e572807e8ec866d63584f280a7a78d3d9c738a</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-11-03T00:15:19.787Z
Answers.Text: It's a new client that we updated from 4.3.x. Thanks for the link.
Answers.UserDisplayName: Charlotta Beavers
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-11-03T00:20:21.890Z
Answers.Text: Ah that would explain it.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-11-03T23:04:53.770Z
Answers.Text: I have updated the question along with my attempt to find a custom solution to this issue using hooks.
Answers.UserDisplayName: Charlotta Beavers
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-11-03T23:11:09.683Z
Answers.Text: You could try https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_alterEntityRefParams/
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-11-04T19:30:05.490Z
Answers.Text: I was able to restore the ability to add mixed client contacts by using the hook__civicrm_alterContent and replace the <input name="add_client_id... element in the content. Thanks again for your assistance Demerit.
Answers.UserDisplayName: Charlotta Beavers
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-11-02T21:41:43.133Z
Answers.LastActivityDate: 2021-11-02T21:41:43.133Z
Answers.UserDisplayName: Demerit
Body: <p>We have 'Allow Multiple Case Clients' enabled on our CiviCRM instance. Before we upgraded to the current version, we were able to add different contact types (individual and organization) to the same CiviCase. But now we cannot. I verified that this is also not possible on the Sandbox version 5.44.alpha1.</p>
  <p>I thought the problem might be with the relationships so as an experiment I set all relationship contact types to 'all contacts' instead of 'individual' or 'organization.' But that didn't resolve the issue.</p>
  <p>The Case Add Client miniform restricts the search for adding additional new clients based on the client contact type that already exists on the case. See the attached images.</p>
  <p><a href="https://i.sstatic.net/rnNy4.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/rnNy4.png" alt="Add new client - one is an example of adding a new client to a case to which an organization is already attached; the other is one where an individual is already attached. The selection only allows for the same contact type to be added." /></a></p>
  <p>Is this a purposeful change to disallow mixed client contact types (ind/org) on the same record or is there something else that I need to do to get this to work?</p>
  <p>Your help is appreciated.</p>
  <p><strong>UPDATED (based on the fact that this is custom functionality):</strong></p>
  <p>I'd like to alter this behavior by setting the contact type API parameter to &quot;IN&quot;:[&quot;Individual&quot;,&quot;Organization&quot;] rather than using the variable $contactType.</p>
  <p>I thought I might be able to use <a href="https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildForm/" rel="nofollow noreferrer">hook_civicrm_buildForm</a> but the CRM_Case_Form_CaseView form includes elements that are hidden and thus do not show up in the $form variable as _elements.</p>
  <p>This is the element in CaseView.tpl that I would like to alter the parameter value:</p>
    
      
    
  <p>Are elements of class 'hiddenElement' accessible to hook_civicrm_buildForm? Or should I be using a different approach?</p>
  <p>Thanks for your help.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-11-02T20:26:14.563Z
Comments.Text: Which civicase is this? The compucorp one or the built-in one?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-11-02T20:47:10.623Z
Comments.Text: Thanks for the response, @Demerit. This is the built-in one.
Comments.UserDisplayName: Charlotta Beavers
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-11-02T21:22:17.053Z
Comments.Text: I don't remember seeing any changes that should change this.
Comments.UserDisplayName: Demerit
Tags: <civicase>
Title: How does one add different client contact types (categories) to the same case?
ThreadText: # How does one add different client contact types (categories) to the same case?
  
  (Asked by: username_0 on 2021-11-02)
  
  We have 'Allow Multiple Case Clients' enabled on our CiviCRM instance. Before we upgraded to the current version, we were able to add different contact types (individual and organization) to the same CiviCase. But now we cannot. I verified that this is also not possible on the Sandbox version 5.44.alpha1.
  
  I thought the problem might be with the relationships so as an experiment I set all relationship contact types to 'all contacts' instead of 'individual' or 'organization.' But that didn't resolve the issue.
  
  The Case Add Client miniform restricts the search for adding additional new clients based on the client contact type that already exists on the case. See the attached images.
  
  [![Add new client - one is an example of adding a new client to a case to which an organization is already attached; the other is one where an individual is already attached. The selection only allows for the same contact type to be added.](https://i.sstatic.net/rnNy4.png)](https://i.sstatic.net/rnNy4.png)
  
  Is this a purposeful change to disallow mixed client contact types (ind/org) on the same record or is there something else that I need to do to get this to work?
  
  Your help is appreciated.
  
  **UPDATED (based on the fact that this is custom functionality):**
  
  I'd like to alter this behavior by setting the contact type API parameter to "IN":["Individual","Organization"] rather than using the variable $contactType.
  
  I thought I might be able to use [hook\_civicrm\_buildForm](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildForm/) but the CRM\_Case\_Form\_CaseView form includes elements that are hidden and thus do not show up in the $form variable as \_elements.
  
  This is the element in CaseView.tpl that I would like to alter the parameter value:
  
  Are elements of class 'hiddenElement' accessible to hook\_civicrm\_buildForm? Or should I be using a different approach?
  
  Thanks for your help.
  
  **Tags:** civicase
  
  > **Comments:**
  > **username_1**: Which civicase is this? The compucorp one or the built-in one?  
  > **username_0**: Thanks for the response, @username_1. This is the built-in one.  
  > **username_1**: I don't remember seeing any changes that should change this.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-11-02. Score: 1 | Accepted answer
  
  It looks like it's been this way since 2015. What version did you upgrade from?
  
  <https://github.com/civicrm/civicrm-core/pull/6806/commits/e7e572807e8ec866d63584f280a7a78d3d9c738a>
  
  > **Comments:**
  > **username_0**: It's a new client that we updated from 4.3.x. Thanks for the link.  
  > **username_1**: Ah that would explain it.  
  > **username_0**: I have updated the question along with my attempt to find a custom solution to this issue using hooks.  
  > **username_1**: You could try https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_alterEntityRefParams/  
  > **username_0**: I was able to restore the ability to add mixed client contacts by using the hook__civicrm_alterContent and replace the <input name="add_client_id... element in the content. Thanks again for your assistance username_1.  
  
  ---
  
  