diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/onDBInsert.js b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/onDBInsert.js index b0c1baba02ef1be52d2fea57401dc417af85cbcf..bc3712278f25894a8721b39e3ab1ce74ecab3e00 100644 --- a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/onDBInsert.js +++ b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/onDBInsert.js @@ -6,5 +6,6 @@ var campaignId = rowdata["CAMPAIGNPARTICIPANT.CAMPAIGN_ID"]; var campaignStepId = rowdata["CAMPAIGNPARTICIPANT.CAMPAIGNSTEP_ID"]; var contactId = rowdata["CAMPAIGNPARTICIPANT.CONTACT_ID"]; var campaignParticipantId = vars.get("$local.uid"); +var previousCampaignstepId = ""; -CampaignUtils.createLogEntry(campaignId, campaignStepId, contactId, campaignParticipantId); \ No newline at end of file +CampaignUtils.createLogEntry(campaignId, campaignStepId, contactId, campaignParticipantId, previousCampaignstepId); \ No newline at end of file diff --git a/process/Campaign_lib/process.js b/process/Campaign_lib/process.js index 4f6bd8f475755b9ab2f1201d3a029ce271eb784f..0cce037c488c4c68225355a8649dea1f20c83021 100644 --- a/process/Campaign_lib/process.js +++ b/process/Campaign_lib/process.js @@ -132,11 +132,11 @@ CampaignUtils.getCampaignStatusByCampaignId = function(pCampaignId) return KeywordUtils.getViewValue(campaignState, statusId); } -CampaignUtils.createLogEntry = function(pCampaignId, pCampaignStepId, pContactId, pCampaignParticipantId) +CampaignUtils.createLogEntry = function(pCampaignId, pCampaignStepId, pContactId, pCampaignParticipantId, pPreviousCampaignstepId) { let colsCampaignParticipantLog = CampaignUtils.getParticipantLogInsertColumnNames(); - let valsCampaignParticipantLog = new Array(pCampaignId, pCampaignStepId, pContactId, pCampaignParticipantId, vars.get("$sys.user"), vars.get("$sys.date")); + let valsCampaignParticipantLog = new Array(pCampaignId, pCampaignStepId, pContactId, pCampaignParticipantId, vars.get("$sys.user"), vars.get("$sys.date"), pPreviousCampaignstepId); let rows = db.insertData("CAMPAIGNPARTICIPANTLOG", colsCampaignParticipantLog, null, valsCampaignParticipantLog); return (rows == 1);