get module dashablerecord.js to use module record.js for the record panel

We have a custom module with a recorddashlet.php layout definition.

We have a record.js record view for that module, including custom functionality for fields (e.g. click as checkbox will populate a corresponding text box with today's date to say the task for the checkbox has been done)

We have custom dashablerecord.js for all modules.

We have a dashablerecord.js for the custom module, which inherits from the custom dashablerecord.js as expected.

We want to get the dashablerecord.js to load the module record.js rather than the default record.js, so that the custom functionality for fields gets used.

Can we do this?

Or do we have to duplicate the functionality somehow?

Parents Reply
  • We realized that dashablerecord.js extends from record.js.

    The code we want to use in dashablerecord needs to be in our custom record.js (generic, rather than module specific).

    We moved the code we want to use from the module-specific record,js to the generic custom record.js (with "if '<MODULE_NAME>'===this.module" wrapper so the code only gets used for the correct module!)

    Now works!

Children
No Data