itglue / powershellwrapper

This PowerShell module acts as a wrapper for the IT Glue API.
Apache License 2.0
120 stars 51 forks source link

Get-ITGlueFlexibleAssetFields Not Working #142

Closed mrobinson-ws closed 2 years ago

mrobinson-ws commented 2 years ago

Steps to reproduce

Get-ITGlueFlexibleAssetFields

Expected behavior

Receive Flexible Asset Fields in order to edit them.

Actual behavior

Error - image

I have updated my "FlexibleAssetFields.ps1" in the resources folder to the current version listed here on github, as the module itself fails with "String cannot be nullable" - previous Bug Report mentions module version 2.1.1 would be fixed, but it is still on 2.1.0, and the code here on the github gives me this error anyway.

Environment

Please share additional details about your environment. Version information for:

Name Value


PSVersion 5.1.22621.285 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.22621.285 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1

OsName : Microsoft Windows 11 Home OsOperatingSystemSKU : WindowsHome OsArchitecture : 64-bit WindowsVersion : 2009 WindowsBuildLabEx : 22621.1.amd64fre.ni_release.220506-1250 OsLanguage : en-GB OsMuiLanguages : {en-GB, en-US}

ecspresso commented 2 years ago

I don't have access to IT Glue anymore but looking at the endpoint, GET /flexible_asset_types/:fat_id/relationships/flexible_asset_fields, an ID is required and the module should not allow a null value.

Try specifying an ID and see if it works.

mrobinson-ws commented 2 years ago

Thanks, that was it. Turns out I was in the wrong place anyway. Thanks again!