-
Notifications
You must be signed in to change notification settings - Fork 170
Error with v3.4.3 #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@DrMarkX, I've found the issue, but unable to recreate. For some reason the reference value for a reference type custom variable is not a sysid, I have not seen this before. When the type is a reference, I've added in 'ReferenceTable' and error handling. I'm hoping this will help us narrow down the issue. Can you test with the script you provided in the discussion and see which entries have a ReferenceTable value and 'Value' is not a sysid? The updated code can be found at https://github.com/Snow-Shell/servicenow-powershell/blob/234-error-with-v343/ServiceNow/Public/Get-ServiceNowRecord.ps1. |
Hi @DrMarkX, just following up, if/when you get time... |
I am so sorry I haven't responded. I did some testing, and the error is not showing. I also caught an issue where I was passing a null value to the user table - which also displayed error messages. |
Discussed in #222
Originally posted by DrMarkX December 20, 2022
From my question #192 I am now getting several 'ID' errors when using this line.
Get-ServiceNowRecord -Table sc_req_item -filter @('number', '-in', ($tasks.'request_item.number'[0..48] -join ',')) -IncludeCustomVariable -Property number -IncludeTotalCount
After several iterations of that error, the correct output is displayed.
Error
Get-ServiceNowRecord : Cannot validate argument on parameter 'ID'. Id must be either a 32 character alphanumeric, ServiceNow sysid, or prefix/id, ServiceNow number.
At C:\Program Files\WindowsPowerShell\Modules\ServiceNow\3.4.3\Public\Get-ServiceNowRecord.ps1:357 char:126
The text was updated successfully, but these errors were encountered: