Skip to content
Snippets Groups Projects
Commit fd690b95 authored by Sebastian Pongratz's avatar Sebastian Pongratz :ping_pong:
Browse files

[Projekt: xRM-ContactManagement][TicketNr.: 1085202][EMail - Fehlermeldung...

[Projekt: xRM-ContactManagement][TicketNr.: 1085202][EMail - Fehlermeldung beim Import einer Mail über das Dashlet]
parent ea2c5863
No related branches found
No related tags found
No related merge requests found
......@@ -242,16 +242,17 @@ IncomingEmailExecutor.prototype.isUnlinkable = function()
*/
IncomingEmailExecutor.getContactDataByEmail = function(pMailAddress, pAlias)
{
var mailAddress = null;
let contactData = null;
try
{
mailAddress = EmailUtils.extractAddress(pMailAddress).toUpperCase();
let mailAddress = EmailUtils.extractAddress(pMailAddress).toUpperCase();
mailAddress = mailAddress ? newSelect("CONTACT.CONTACTID, CONTACT.STATUS, CONTACT.PERSON_ID, CONTACT.ISOLANGUAGE", pAlias)
contactData = mailAddress ? newSelect("CONTACT.CONTACTID, CONTACT.STATUS, CONTACT.PERSON_ID, CONTACT.ISOLANGUAGE", pAlias)
.from("COMMUNICATION")
.join("CONTACT", newWhere("COMMUNICATION.OBJECT_ROWID = CONTACT.CONTACTID").and("COMMUNICATION.OBJECT_TYPE", "Contact"))
.join("CONTACT","COMMUNICATION.OBJECT_ROWID = CONTACT.CONTACTID")
.where("COMMUNICATION.ADDR", mailAddress, "upper(#) = ?")
.and("COMMUNICATION.OBJECT_TYPE", "Contact")
.table()
: [];
}
......@@ -261,7 +262,7 @@ IncomingEmailExecutor.getContactDataByEmail = function(pMailAddress, pAlias)
logging.log(pException, logging.ERROR);
}
return mailAddress;
return contactData;
}
/**
......@@ -361,10 +362,12 @@ IncomingEmailExecutor.prototype.createActivity = function(pAdditionalLinks, pIsE
prefered: [],
failback: []
};
recipientsInfo.forEach(this._getProcessingFunction(false, recipientContacts), this);
this.activityData.links = this.activityData.links.concat(recipientContacts.prefered.length > 0 ? recipientContacts.prefered
if (recipientsInfo)
{
recipientsInfo.forEach(this._getProcessingFunction(false, recipientContacts), this);
this.activityData.links = this.activityData.links.concat(recipientContacts.prefered.length > 0 ? recipientContacts.prefered
: recipientContacts.failback);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment