How to Create custom View In Sugarcrm 9.x EP. ?

Hi All ,

I want To create custom View action page like own design and insert Code. within the module like leads. 

  • Hi,

    To create a custom view in module level we need to create layout and view in under the following path 

    Example : if you want to create a custom view in under Leads module

    Layout: /custom/modules/Leads/clients/base/layouts/my-layout/my-layout.php

    $viewdefs['Leads']['base']['layout']['my-layout'] = array(
    'type' => 'simple',
    'components' => array(
    'view' => 'my-view',



    className: 'my-view tcenter',
    cubeOptions: {
    spin: false
    events: {
    'click .sugar-cube': 'spinCube'
    spinCube: function() {
    this.cubeOptions.spin = !this.cubeOptions.spin;


    padding-top: 5%;
    } .sugar-cube
    display: inline;


    <h1>My View</h1>

    {{{subFieldTemplate 'sugar-cube' 'detail' cubeOptions}}}

    <p>Click to spin the cube!</p>

    Once the above files have created in respective path navigate to admin and give repair&rebuild.

    To access the view: http://{site url}/#<module>/layout/my-layout

    The above is for module without particular event from the record/list view

    we can also create a custom view based on the particular event in record like saving record or updating filed events then calling the custom view for this we have to write a js event record.js file

    Ans if you want to show the data in the view then we have to create REST API and parse the data from to the custom view.

    Below is the URL for your reference:…