Record view wont fill all fields, help please.

Hi everybody,

I have a really big problem. When I go into a record view of leads I'll load a custom metadata but when it render the data won't load on the values saved from the create.

I load custom metadata like this:

initialize: function (options) {

     options.meta = _.extend(options.meta, app.metadata.getView(options.module, 'sucesion'));

     this._super("initialize", [options]);

}

I got many custom metadata to load like this on the module, but when the view renders only some of the fields get filled.

If i edit on that record view after saving it will load all the fields data correctly.

I don't know what to do, right now I'm trying to debug and see what it does after save on the record so i can load the fields data like it does in after save.

Any help will be really appreciated

  • Hi, I finally solved it.

    It was loading the data from the native record.php instead of my custom view (sucesion.php), so to load the data for the view you choose you will need to tell it after the initialize like this

    initialize: function (options) {
         //You tell which view to use, in this case custom/modules/Contacts/clients/base/views/sucesion/sucesion.php
         options.meta = _.extend(options.meta, app.metadata.getView(options.module, 'sucesion'));
         this._super("initialize",[options]);
         //And also which fields you will need the data to populate the view you choose
         this.context.set('dataView', 'sucesion');
    }
    

    Hope this helps anyone with the same problem,