Open goback136 opened 4 years ago
Hotfixed this 2 new parameters:
function New-TdIncident { .... [hashtable]$OptionalFields1, [hashtable]$OptionalFields2, ....
OptionalFields1 { $Body | Add-Member -MemberType NoteProperty -Name 'optionalFields1' -Value $OptionalFields1 } OptionalFields2 { $Body | Add-Member -MemberType NoteProperty -Name 'optionalFields2' -Value $OptionalFields2 }
Can you provide an example (and perhaps update the docs) of how to set a value in an optional field X -> drop down X for a new incident?
Sure
$Vrije_velden = @{} $Vrije_velden.add('text1',$x) $Vrije_velden.add('text2',$y) $Vrije_velden.add('number1',$a) $Vrije_velden.add('number2',$b) $Vrije_velden.add('boolean3','true')
$IncidentParams = @{
BriefDescription = $MeldingTitel
CallerName= $MelderNaam
CallerEmail = $MelderMail
CallerMobileNumber = $MelderGSM
Request= $MeldingBeschrijving
ExternalNumber = $SubmissionID
CallerBranchId = (Get-TdBranch -name 'My branch').id
EntryTypeId = (Get-TdEntryType -Name 'Website').id
PriorityId = (Get-TdPriority -Name $Prioriteit ).id
OperatorId = (Get-TdOperatorGroup -Name $Behandelaar).id
OperatorGroupID = (Get-TdOperatorGroup -Name $Behandelaar).id
optionalFields1 = $Vrije_velden
}
New-TdIncident @IncidentParams -verbose
Unlike Set-TdBranch New-TdIncident doesn't support the optional fields while the API does seem to support it.
https://developers.topdesk.com/documentation/index.html#api-Incident-CreateIncident For example "optionalFields1" : { "boolean1" : "true" }