Skip to content

Commit 07f6414

Browse files
3 Bugfixes (#25)
* 3 Bugfixes Fixed: #24 -> Mapping checks for person now #23 -> Removed Auditlogs in update when there are no changes #21 -> Edited currentaccount to value in outputdata * Processed feedback Return null email on delete Revert changes done to create. Currentaccount retrieves 'medewerker', not the account so Currentaccount.personid should work.
1 parent c955610 commit 07f6414

2 files changed

Lines changed: 1 addition & 13 deletions

File tree

fieldMapping.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@
324324
"Delete"
325325
],
326326
"MappingMode": "Complex",
327-
"Value": "\"function getEmail() {\\r\\n let domain = '@enjoy.com';\\r\\n let email = 'unknown' + domain;\\r\\n\\r\\n if (typeof Person.Contact.Personal.Email !== 'undefined' && Person.Contact.Personal.Email) {\\r\\n email = Person.Contact.Personal.Email;\\r\\n }\\r\\n else if (typeof Person.ExternalId !== 'undefined' && Person.ExternalId) {\\r\\n email = Person.ExternalId;\\r\\n email = email + domain;\\r\\n }\\r\\n return email;\\r\\n}\\r\\n\\r\\ngetEmail();\"",
327+
"Value": "\"function getEmail() {\\r\\n return null;\\r\\n}\\r\\n\\r\\ngetEmail();\"",
328328
"UsedInNotifications": false,
329329
"StoreInAccountData": false
330330
}

update.ps1

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -425,18 +425,6 @@ try {
425425
}
426426
'NoChanges' {
427427
Write-Verbose "No changes needed for AFAS user [$($currentAccount.Gebruiker)]"
428-
429-
if (-Not($actionContext.DryRun -eq $true)) {
430-
$outputContext.AuditLogs.Add([PSCustomObject]@{
431-
Action = "UpdateAccount"
432-
Message = "No changes needed for AFAS user [$($currentAccount.Gebruiker)]"
433-
IsError = $false
434-
})
435-
}
436-
else {
437-
Write-Warning "DryRun: No changes needed for AFAS user [$($currentAccount.Gebruiker)]"
438-
}
439-
440428
break
441429
}
442430
}

0 commit comments

Comments
 (0)