KelvinTegelaar / AutotaskAPI

Autotask 2020.2 REST API PowerShell wrapper
https://cyberdrain.com
MIT License
67 stars 25 forks source link

[BUG] Unable to query companies with "ID" #46

Closed abdealikhurrum closed 2 years ago

abdealikhurrum commented 2 years ago

Describe the bug I am unable to query company objects using the -id parameter in get-autotaskapiresource To Reproduce Steps to reproduce the behavior: Get-AutotaskAPIResource -id "$companyid" -Resource 'Companies' -verbose

Expected behavior For the API to return an Autotask object with the company details. It works using simplesearch: Get-AutotaskAPIResource -simplesearch "id eq $companyid" -Resource 'Companies' -verbose

Screenshots image Desktop (please complete the following information):

KelvinTegelaar commented 2 years ago

In your screenshot $CompanyId is an object with 'index' and 'name', and not an integer it expects.

abdealikhurrum commented 2 years ago

Getting the same error when inputting the ID directly: image

KelvinTegelaar commented 2 years ago

Fixed in dev, will be uploading today.