email to case account

This commit is contained in:
Yuri Kuznetsov
2021-11-23 15:16:52 +02:00
parent 6207c8f547
commit 9220ad8baa
+8
View File
@@ -214,6 +214,9 @@ define('views/email/detail', ['views/detail', 'email-helper'], function (Dep, Em
var parentType = this.model.get('parentType');
var parentName = this.model.get('parentName');
var accountId = this.model.get('accountId');
var accountName = this.model.get('accountName');
if (parentId) {
if (parentType === 'Account') {
attributes.accountId = parentId;
@@ -226,6 +229,11 @@ define('views/email/detail', ['views/detail', 'email-helper'], function (Dep, Em
attributes.contactsIds = [parentId];
attributes.contactsNames = {};
attributes.contactsNames[parentId] = parentName;
if (accountId) {
attributes.accountId = accountId;
attributes.accountName = accountName || accountId;
}
}
}