Created
June 12, 2015 10:29
-
-
Save maranemil/18836d6559a386a41ee6 to your computer and use it in GitHub Desktop.
SugarCRM7 Add custom action button and custom view with drawer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Step 1. Create Custom Layout in: | |
| custom/modules/<YourModule>/clients/base/layouts/<YourLayout>/<YourLayout>.php | |
| Define YourLayout | |
| and define $viewdefs['YourModule']['base']['layout']['YourLayout'] .... | |
| ... | |
| 'components' => | |
| array( | |
| array( | |
| 'view' => 'YourView', | |
| ), | |
| ), | |
| ------------------------------------------------------------------- | |
| Step 2. Create custom view: | |
| custom/modules/YourModule/clients/base/views/YourView/YourView.hbs | |
| custom/modules/YourModule/clients/base/views/YourView/YourView.php | |
| Define YourView php and hbs: | |
| $viewdefs['YourModule']['base']['views']['YourView'] ... | |
| --------------------------------------------------------------------- | |
| Step 3. Create a button and call a drawer from extended Recorview as: | |
| extendsFrom: 'StickyRowactionField', .... | |
| custom/modules/YourModule/clients/base/fields/YourLinkAction/YourLinkAction.js | |
| ... | |
| app.drawer.open({ | |
| layout: 'YourLayout', | |
| context: { | |
| create: true, | |
| } | |
| }); | |
| tutorial create-action | |
| http://www.insightful.com.au/sugarcrm-how-do-i/creating-custom-button-sugar-7/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment