Hello everyone,
Could you help me with the following problem please. I am creating a dynamic controller for "Case" but when I try to get a model attribute in the following way "this.model.get('type')" or in this way "this.recordView.model.get('type') "The first time I enter a record after rebuilding, deleting the cache and reloading the page, it shows me "undefined" in the console but if I exit and re-enter the same record it shows me the correct data.
What can I do to always get the correct data?
this is the code I'm using
Could you help me with the following problem please. I am creating a dynamic controller for "Case" but when I try to get a model attribute in the following way "this.model.get('type')" or in this way "this.recordView.model.get('type') "The first time I enter a record after rebuilding, deleting the cache and reloading the page, it shows me "undefined" in the console but if I exit and re-enter the same record it shows me the correct data.
What can I do to always get the correct data?
this is the code I'm using
HTML Code:
define('custom:case-dynamic-handler', ['dynamic-handler'], (Dep) => { return class extends Dep { init() { this.controlEnum(); } controlEnum() { console.log(this.model.get('type')); console.log(this.recordView.model.get('type')); } } });
Comment