Answers.Body: <p>I think invoking below method in your extensions Upgrader.php incrementalupgrade function will re-build all your managed entities from all extension.</p>
  <pre><code>CRM_Core_Invoke::rebuildMenuAndCaches();
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-19T20:17:56.043Z
Answers.LastActivityDate: 2020-08-19T20:17:56.043Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>What's the best way to trigger managed entity processing as part of an extension upgrade? I have an extension that is already installed on a site. I'm rolling out an upgrade that implements a new custom report, including the .mgd.php file. I'd like that report template to be installed as part of the extension version upgrade. But I'm not sure the best way to &quot;refresh&quot; the system to process that .mgd.php file (which is generally only processed during installation).</p>
  
Tags: <extension>
Title: how do you process mdg.php files during an extension upgrade?
ThreadText: # how do you process mdg.php files during an extension upgrade?
  
  (Asked by: username_0 on 2020-08-19)
  
  What's the best way to trigger managed entity processing as part of an extension upgrade? I have an extension that is already installed on a site. I'm rolling out an upgrade that implements a new custom report, including the .mgd.php file. I'd like that report template to be installed as part of the extension version upgrade. But I'm not sure the best way to "refresh" the system to process that .mgd.php file (which is generally only processed during installation).
  
  **Tags:** extension
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-08-19. Score: 1 | Accepted answer
  
  I think invoking below method in your extensions Upgrader.php incrementalupgrade function will re-build all your managed entities from all extension.
  
  ```
  CRM_Core_Invoke::rebuildMenuAndCaches();
  
  ```
  
  
  ---
  
  