Adding entrypoints via the Ext framework in a package

sugarcrmdevelopers —  October 18, 2012 — 9 Comments

A long time ago we had a post on adding new entrypoints ( one of my first posts on this very blog 🙂 ), and back then there wasn’t a very clean way to add entrypoints via a package without potentially stepping on other custom defined entrypoints. After having a few people ask questions about this, I thought I’d throw together a more complete post illustrating all the pieces of the package to make this work using the Ext Framework pieces added in SugarCRM 6.3.

First let’s define both the entrypoint itself ( which we’ll put in the myentrypoint.php file ) as well as the entrypoint registry definition ( in the myentrypoint_registry.php file ).

Now comes the manifest definition. Here we will add an entry in the installdefs ‘entrypoints’ which will define where the source of the entrypoint registry file additions should come from. This registry file we defined above will then be put in the custom/Extension/application/Ext/EntryPointRegistry/ directory, and after the package is installed will be combined with any existing entrypoint registry files into the custom/application/Ext/EntryPointRegistry/entry_point_registry.ext.php file.

You then will be able to access your entrypoint at the URI index.php?entryPoint=myentrypoint.

9 responses to Adding entrypoints via the Ext framework in a package


    How is utilizing the $installdefs[‘entrypoints’] different than just using $installdefs[‘copy’] and putting the file in custom/Extension/… ? I guess that question applies to language and maybe other $installdef pieces as well.


      I believe the big piece is that it will automatically kick off the “Quick Rebuild and Repair” to make sure the updates take effect right away. Just copying the files in may not do that.


    who do specify auth=>true vs auth=>false?


    After trying to add an entry point to the calls module via the the $installdefs method, I found this caveat: The extension is designed only to install module-loaded entry points to the ‘application’ module, i.e. to the system and not to any specific module. This means that specifying your ‘to_module’ => ‘application’ is unnecessary and specifying any other module still results in the Entry Point being brought into the ‘application’ directory and not to your module.

    The issue/cause is in /ModuleInstall/extensions.php:
    “entrypoints” => array(“section” => “entrypoints”, “extdir” => “EntryPointRegistry”, “file” => ‘entry_point_registry.ext.php’, “module” => “application”),

    So, if you need to package an entry point for a specific module, you’re left with the only other option of using $installdef[‘copy’] to copy the file in the appropriate place, hoping to avoid a naming conflict (usually not too difficult if you prefix your files with a company name or something). Note that you DO NOT need to do a Repair and Rebuild, the Entry Points are apparently rebuilt automatically.

    All of the above tested in 6.5.7 Pro.


    thanks for this post.
    can I connect to entrypoints with httpPost ? or only with httpGet.


Trackbacks and Pingbacks:

  1. get sugar entry to ajax autocomplere.php - November 28, 2012

    […] […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s