Answers.Body: <p>I had this issue just now as well, the full error was:</p>
  <pre><code>CRM_Core_Exception: Invalid Entity Filter in CRM_Core_BAO_CustomGroup::validateSubTypeByEntity() (line 651 of /var/www/html/sites/all/modules/civicrm/CRM/Core/BAO/CustomGroup.php).
  </code></pre>
  <p>If you look at the code, you can see that subtypes of entities have to be integers (with the exception of contacts, which appear to have been grandfathered in).</p>
  <p>What that means is that when you create a new grant type, you can choose the label and the description, but you shouldn't override the &quot;value&quot; field, which will get auto-populated as the next available integer (for that 'option group'). Or, if you do, you can only choose a numeric value.</p>
  <p>Or at least, you have to follow this rule if you want to create custom field groups which are restricted to these grant types. And you probably want to do it anyway.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-27T17:31:52.983Z
Answers.LastActivityDate: 2022-09-27T17:31:52.983Z
Answers.UserDisplayName: Alan Dixon
Body: <p>I'm running the latest version on WordPress. When I tried several times to add a grant, the following error showed:</p>
  
  <pre><code>CRM_Core_Exception: Invalid Entity Filter in /public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomGroup.php on line 485
  </code></pre>
  
  <p>I did add a few grant types and disabled the originally installed ones. Could that be the issue?</p>
  
  <p>Thanks!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-04T19:27:52.770Z
Comments.Text: OK, I changed the values of the "grant types" from texts to numbers and the error finally went away. I'm able to use texts as values on other dropdown fields such as Contacts, just not for grant types, apparently.
Comments.UserDisplayName: j007w
Tags: <civigrant>
Title: Invalid Entity Filter in CiviGrant
ThreadText: # Invalid Entity Filter in CiviGrant
  
  (Asked by: username_0 on 2019-02-04)
  
  I'm running the latest version on WordPress. When I tried several times to add a grant, the following error showed:
  CRM_Core_Exception: Invalid Entity Filter in /public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomGroup.php on line 485
  
  I did add a few grant types and disabled the originally installed ones. Could that be the issue?
  Thanks!
  
  **Tags:** civigrant
  
  > **Comments:**
  > **username_0**: OK, I changed the values of the "grant types" from texts to numbers and the error finally went away. I'm able to use texts as values on other dropdown fields such as Contacts, just not for grant types, apparently.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-09-27. Score: 3
  
  I had this issue just now as well, the full error was:
  CRM_Core_Exception: Invalid Entity Filter in CRM_Core_BAO_CustomGroup::validateSubTypeByEntity() (line 651 of /var/www/html/sites/all/modules/civicrm/CRM/Core/BAO/CustomGroup.php).
  
  If you look at the code, you can see that subtypes of entities have to be integers (with the exception of contacts, which appear to have been grandfathered in).
  What that means is that when you create a new grant type, you can choose the label and the description, but you shouldn't override the "value" field, which will get auto-populated as the next available integer (for that 'option group'). Or, if you do, you can only choose a numeric value.
  Or at least, you have to follow this rule if you want to create custom field groups which are restricted to these grant types. And you probably want to do it anyway.
  
  
  ---
  
  