Closed bartstinissen closed 5 years ago
When you want to create a person with the command New-TDPerson with the parameter "DepartmentId" with a correct DepartmentId value, the follwing error occurs:
Command:
New-TdPerson -Surname $Surname -BranchId (Get-TdBranch -Name $Office).id -DepartmentId (Get-TdDepartment | Where-Object Name -EQ "$Department" | Select -ExpandProperty id) -Email $PRD_EMailAddress -FirstName $FirstName -JobTitle $JobTitle -ManagerId (Get-TdPerson -Email $Manager).id -MobileNumber $Mtel -NetworkLoginName $loginname -PhoneNumber $VTel -TasLoginName $PRD_EMailAddress
Error:
Invoke-RestMethod : [{"message":"The field 'departmentId' does not exist."}] At line:86 char:17
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Fixed in #59
When you want to create a person with the command New-TDPerson with the parameter "DepartmentId" with a correct DepartmentId value, the follwing error occurs:
Command:
New-TdPerson -Surname $Surname -BranchId (Get-TdBranch -Name $Office).id -DepartmentId (Get-TdDepartment | Where-Object Name -EQ "$Department" | Select -ExpandProperty id) -Email $PRD_EMailAddress -FirstName $FirstName -JobTitle $JobTitle -ManagerId (Get-TdPerson -Email $Manager).id -MobileNumber $Mtel -NetworkLoginName $loginname -PhoneNumber $VTel -TasLoginName $PRD_EMailAddress
Error:
Invoke-RestMethod : [{"message":"The field 'departmentId' does not exist."}] At line:86 char:17