Skip to content

Commit

Permalink
Merge pull request #340 from vlocityinc/beta
Browse files Browse the repository at this point in the history
Fix issue with generating bad VlocityRecordSourceKeys
  • Loading branch information
Adam Rutland authored Dec 17, 2020
2 parents 98483de + c04c2fc commit 5546fd8
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion lib/datapacksutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,22 @@ DataPacksUtils.prototype.refreshDataPackFields = function(currentData) {
} else {
if (currentData.VlocityDataPackType == "SObject") {
currentData.VlocityDataPackIsIncluded = true;
delete currentData.VlocityRecordSourceKeyOriginal;

if (currentData.VlocityRecordSourceKeyOriginal) {
currentData.VlocityRecordSourceKey = currentData.VlocityRecordSourceKeyOriginal;
}
}

if (currentData.VlocityMatchingRecordSourceKey || currentData.VlocityLookupRecordSourceKey) {
delete currentData.VlocityRecordSourceKey;
}

delete currentData.VlocityRecordSourceKeyOriginal;

for (var key in currentData) {
if (typeof currentData[key] === "object") {
this.refreshDataPackFields(currentData[key]);
}
}
}
}
Expand Down

0 comments on commit 5546fd8

Please sign in to comment.