How do you extend the create.js on a module level?

We have created a 1 to 1 relationship for 2 custom modules. Now when we create a related record based on the parent record we want to hide or do some customization on the create drawer. We have already achieved this but we have to copy the entire create.js file to custom/client/base/view/create/create.js. My question is can this be done on a modular level without the need to copy the entire file?
Parents
  • Hi EvilPeri,

    After some further investigation, customizing extending create.js at a modular level is possible as you seem to have found. To help others encountering this same issue, module specific custom views can extend from the base one, if no module specific view for that module exists out of the box. 

    If the following example was created in custom/modules/<module name>/clients/base/views/create/create.js , it would do as expected and extend from the base create view. 

    ({     extendsFrom: 'CreateView',
        /**
         * Some extra functionality
         */
        doSomethingCool: function() {
        },
        _dispose: function() {
            //additional stuff before calling the core create _dispose goes here
            this._super('_dispose');
        }
    })
    Chris

  • Hi Chris,

    Another question is there a way to augment or extend the context or the data manager models? 

    My customization involves 3 modules, first M1 and M2 have a 1 to 1 relationship and M3 has a many to one relationship with M2. Now i want to pull all the subpanels (not just the data) of M2 and display it on M1. Is this possible to implement on sugarcrm 7.1.5 Pro now?
Reply Children
No Data