You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Feat: new powershell connector
* Feat: add fieldMapping and updated readme
* Fix: Update Logo URL
* Fix: Added create action for UsId
* Added note for field mapping UsId
* Added <CustomerCode> placeholder in UsId
* feat: added support voor Site/InSi on enable/disable
* fix: updateOnupdate to onlyUpdateOnCorrelate
* Fix: auditlogs exceeded data size limit.
Copy file name to clipboardExpand all lines: configuration.json
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -42,23 +42,23 @@
42
42
}
43
43
},
44
44
{
45
-
"key": "createAccount",
45
+
"key": "createUser",
46
46
"type": "checkbox",
47
47
"defaultValue": false,
48
48
"templateOptions": {
49
-
"label": "Create account when not found",
49
+
"label": "Create user when not found",
50
50
"required": false,
51
-
"description": "When toggled, if the user account is not found, a new AFAS user account will be created in the create action (only in the create action)."
51
+
"description": "When toggled, if the user account is not found, a new the AFAS user account will be created in the create action (only in the create action)."
52
52
}
53
53
},
54
54
{
55
-
"key": "updateOnCorrelate",
55
+
"key": "onlyUpdateOnCorrelate",
56
56
"type": "checkbox",
57
57
"defaultValue": false,
58
58
"templateOptions": {
59
-
"label": "Update on correlate",
59
+
"label": "Only update on correlate",
60
60
"required": false,
61
-
"description": "When toggled, if the mapped data differs from data in AFAS, the AFAS user will be updated in the create action (not just correlated)."
61
+
"description": "When toggled, the AFASuser will only be updated when the account is correlated"
Write-Verbose"Updating AFAS user [$($currentAccount.Gebruiker)]. Old values: $($changedPropertiesObject.oldValues|ConvertTo-Json-Depth 10). New values: $($changedPropertiesObject.newValues|ConvertTo-Json-Depth 10)"
Message="Successfully updated AFAS user [$($currentAccount.Gebruiker)]. Old values: $($changedPropertiesObject.oldValues|ConvertTo-Json-Depth 10). New values: $($changedPropertiesObject.newValues|ConvertTo-Json-Depth 10)"
341
359
IsError=$false
342
360
})
343
361
}
344
362
else {
345
363
Write-Warning"DryRun: Would update AFAS user [$($currentAccount.Gebruiker)]. Old values: $($changedPropertiesObject.oldValues|ConvertTo-Json-Depth 10). New values: $($changedPropertiesObject.newValues|ConvertTo-Json-Depth 10)"
346
364
}
347
-
348
-
break
349
365
}
350
366
catch {
351
367
$ex=$PSItem
352
368
$errorMessage=Get-ErrorMessage-ErrorObject $ex
353
369
354
370
Write-Verbose"Error at Line '$($ex.InvocationInfo.ScriptLineNumber)': $($ex.InvocationInfo.Line). Error: $($errorMessage.VerboseErrorMessage)"
355
371
356
-
$auditLogs.Add([PSCustomObject]@{
357
-
#Action = "" # Optional
372
+
$outputContext.AuditLogs.Add([PSCustomObject]@{
373
+
Action="DeleteAccount"
358
374
Message="Error updating AFAS user [$($currentAccount.Gebruiker)]. Error Message: $($errorMessage.AuditErrorMessage). Old values: $($changedPropertiesObject.oldValues|ConvertTo-Json-Depth 10). New values: $($changedPropertiesObject.newValues|ConvertTo-Json-Depth 10)"
359
375
IsError=$true
360
376
})
377
+
378
+
# Skip further actions, as this is a critical error
379
+
throw"Error updating AFAS user"
361
380
}
362
381
363
382
break
364
383
}
365
384
'NoChanges' {
366
385
Write-Verbose"No changes needed for AFAS user [$($currentAccount.Gebruiker)]"
367
386
368
-
if (-not($dryRun-eq$true)) {
369
-
$auditLogs.Add([PSCustomObject]@{
370
-
#Action = "" # Optional
387
+
if (-Not($actionContext.DryRun-eq$true)) {
388
+
$outputContext.AuditLogs.Add([PSCustomObject]@{
389
+
Action="DeleteAccount"
371
390
Message="No changes needed for AFAS user [$($currentAccount.Gebruiker)]"
372
391
IsError=$false
373
392
})
@@ -379,33 +398,17 @@ try {
379
398
break
380
399
}
381
400
}
382
-
383
-
# Define ExportData with account fields and correlation property
0 commit comments