Skip to content
Snippets Groups Projects
Commit 69cad7e0 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

Bugfixes Leadimport

parent 6488a136
No related branches found
No related tags found
No related merge requests found
......@@ -214,7 +214,7 @@ function ImportData(pDataFields, pDataTypes, pFieldDef, pFieldValues, pImportDef
var leadId = InsertTable(pDataFields, pDataTypes ,LeadValues, "LEAD", pUser, pDate);//inserts the LEAD dataset
InsertLeadAttr(pAttrObject, orgid, persid, LeadValues["DATE_NEW"], pUser, pDate, orgRet[3]);
InsertLeadAttr(pAttrObject, orgid, persid, LeadValues["DATE_NEW"], pUser, pDate, (orgRet && orgRet.length >= 4 && orgRet[3]));
return [leadId, persForDubCheck, orgsForDubCheck];
}
......@@ -466,7 +466,7 @@ function InsertComm(pDataFields, pDataTypes, pLeadValues, contactId, pUser, pDat
* @param {String} pUser req the importuser
* @param {String} pDate req the importdate
*
* @return {String []} ( organisationId, contactId, duplicateMapping, true/false)
* @return {String[]} ( organisationId, contactId, duplicateMapping, true/false)
*/
function InsertOrg(pDataFields, pDataTypes, pFieldDef, pFieldValues, pUser, pDate)
{
......
......@@ -129,12 +129,14 @@ try
{
var dupCheck = ImportData(DataFields, DataTypes, FieldDef, impvalues, importdefid, AttrObject, source, user, currDate);
allContactData[dubCheck[0]] = [dupCheck[1], dupCheck[2]]; //persObj, orgObj
allContactData[dupCheck[0]] = [dupCheck[1], dupCheck[2]]; //persObj, orgObj
}
catch(ex)//if error increase the errorCount and write a rhinoException into the string for the error file
{
exeptions = exeptions + "Zeile " + dsanz + ": " + logging.toLogString(ex.rhinoException != undefined ? ex.rhinoException : ex, true) + "\r\n";
var exeption = "Zeile " + dsanz + ": " + logging.toLogString(ex.rhinoException != undefined ? ex.rhinoException : ex, true) + "\r\n";
exeptions = exeptions + exeption;
errorCount++;
logging.log(exeption);
}
}
}
......@@ -171,6 +173,7 @@ if(exeptions != "")//insert error document
if (userId)// if there is an user - show a notification to this user when the import is complete
{
var description = translate.withArguments("%0 leads imported, %1 errors", [rows, errorCount]);
logging.log(JSON.stringify([exeptions], null, "\t"))
notification.addNotification(util.getNewUUID(), null, null, null, "LeadImport_Notification", notification.PRIO_NORMAL, 2, notification.STATE_UNSEEN, [userId], importName, description);
}
......
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