Hi,
RESOLVED..
my apology, this was a old beforSave hook who empty my field.
so this function perfecly
RESOLVED..
my apology, this was a old beforSave hook who empty my field.
so this function perfecly
PHP Code:
define('custom:views/meeting/detail', ['crm:views/meeting/detail'], function (Dep) {
return Dep.extend({
setup: function () {
Dep.prototype.setup.call(this);
this.listenTo(this.model, 'change:parentId', function () {
if (this.model.get('parentId') && this.model.get('parentType') =='Patient' && this.model.hasChanged('parentId') ){
this.ajaxGetRequest('Patient/' + this.model.get('parentId')).then(function (patient) {
let place = patient['addressStreet'] +' ' + patient['addressPostalCode'] + ' ' + patient['addressCity'];
this.model.set('place', place );
this.model.save({place: place}, {patch: true});
this.trigger('after:save', this.model);
}.bind(this));
}
}, this);
},
afterRender: function() {
Dep.prototype.afterRender.call(this);
},
});
});
Comment