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 guys,

    I've had the same result on 7.5.1. I'm not able to extend create, but am able to extend create-actions.
Reply Children
No Data