AnsweredAssumed Answered

Adding field validation to record view in custom module

Question asked by HolgerSchmidt on Jan 28, 2016
Latest reply on Feb 15, 2016 by HolgerSchmidt

Hi,

 

Thanks to help of the community I managed to add a custom field validation to the Contacts module.

How to extend field validation to a field value of a related record

 

Now I try to do something similar to a custom module.

 

However, if I create a record.js file in the path

/custom/modules/my_Module/clients/base/views/record/record.js

even if it's not having any read code besides the framework, the form is no longer being loaded.

 

({
    extendsFrom: 'my_ModuleRecordView', 
    initialize: function (options) {
        this._super('initialize', [options]);
        console.log("entering custom code");
    },
})

 

I can see the code is loaded by the console output.

 

As a difference to the standard modules, there is already a record.php in the same directory generaated by Studio.

 

Maybe the record.js is overriding the record.php and block it?

 

Does anybody know how this could be done?

 

Thanks,

Holger

Outcomes