Answers.Body: <p>Found it!!! Used ElementQuery::EVENT_AFTER_PREPARE</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-03T06:01:17.110Z
Answers.LastActivityDate: 2021-02-03T06:01:17.110Z
Answers.UserDisplayName: Ram
Body: <p>I was referring to <a href="https://craftcms.stackexchange.com/questions/19575/filter-entries-in-the-cp-based-on-custom-permission">Filter entries in the CP based on custom permission</a> and <a href="https://craftcms.stackexchange.com/questions/19575/filter-entries-in-the-cp-based-on-custom-permission">Filter entries in the CP based on custom permission</a></p>
  <p>It seems onBuildElementsQuery was available only in 2.x.
  Is there any alternative for craft 3.x?</p>
  
Tags: <plugin-development><control-panel><events><security><hook>
Title: Apply custom filter on the entries in admin control panel using custom plugin in craft cms 3.5
ThreadText: # Apply custom filter on the entries in admin control panel using custom plugin in craft cms 3.5
  
  (Asked by: username_0 on 2021-01-30)
  
  I was referring to [Filter entries in the CP based on custom permission](https://craftcms.stackexchange.com/questions/19575/filter-entries-in-the-cp-based-on-custom-permission) and [Filter entries in the CP based on custom permission](https://craftcms.stackexchange.com/questions/19575/filter-entries-in-the-cp-based-on-custom-permission)
  
  It seems onBuildElementsQuery was available only in 2.x.
  Is there any alternative for craft 3.x?
  
  **Tags:** plugin-development, control-panel, events, security, hook
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-02-03. Score: 2 | Accepted answer
  
  Found it!!! Used ElementQuery::EVENT\_AFTER\_PREPARE
  
  
  ---
  
  