Create Custom EntryPoint

This blog post explains how to create custom entrypoint. Steps are as below,

Step 1 : First of all create an file in \custom\include\MVC\Controller\entry_point_registry.php and add below code,

<?php

if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

require SUGAR_PATH . '/include/MVC/Controller/entry_point_registry.php';
$entry_point_registry['<entry_point_name>']=array('file' => 'custom/modules/<desired_module>/<any_name>.php', 'auth' => true);

?>

Step 2 : Create file custom/modules/<desired_module>/<any_name>.php and add your code,

Step 3 : Hit custom entryPoint using URL as below,

<URL>?entryPoint=<entry_point_name>

Note :

Here, <desired_module> means the module name you see in the URL, for example, Contacts, Leads, etc.
Here, <any_name> means the any file name for example, custom_fields, search_fields, etc.
Here, <entry_point_name> means any name as your requirements

Hope you find this blog post helpful.

Feel free to add comments and queries, that helps us to improve the quality of posts.

You can contact us at info@infotechbuddies.com

Thank you.

Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *