Hi,
I got a completely weird problem, I never faced before. i.e model shows email, and a few other fields as undefined for contact record, and when I refresh the page it starts showing me data.
My aim to add a custom button in detail layout of contact if that record meets condition.
in js for contact/record/detail I wrote following lines
setup: function(){
Dep.prototype.setup.call(this);
if(!_.isEmpty(this.model.get("cVId"))){
this.buttonList.push({
name: "submitCandidate",
label: this.translate('submitCandidate', 'labels', 'Contact'),
action: "submitCandidate",
style: "warning"
});
}
},
this.model.get("cVId") contains a value but it doesn't add button in first run, I have to reload page every time i visit contact detail page from list view.
Please advise if there is any change regarding model fetching in setup in new releases or anything is wrong with my code.
Thanks
Devs Crew
I got a completely weird problem, I never faced before. i.e model shows email, and a few other fields as undefined for contact record, and when I refresh the page it starts showing me data.
My aim to add a custom button in detail layout of contact if that record meets condition.
in js for contact/record/detail I wrote following lines
setup: function(){
Dep.prototype.setup.call(this);
if(!_.isEmpty(this.model.get("cVId"))){
this.buttonList.push({
name: "submitCandidate",
label: this.translate('submitCandidate', 'labels', 'Contact'),
action: "submitCandidate",
style: "warning"
});
}
},
this.model.get("cVId") contains a value but it doesn't add button in first run, I have to reload page every time i visit contact detail page from list view.
Please advise if there is any change regarding model fetching in setup in new releases or anything is wrong with my code.
Thanks
Devs Crew
Comment