When attempting to use the Update-CWMCompanyConfigurationTypeQuestionValue function from the ConnectWiseManageAPI PowerShell module, I encountered a 404 Not Found error. The purpose was to update the answer for a specific question associated with a company configuration.
If I run the below command I get the following information:
Get-CWMCompanyConfiguration -id 28994
id: 28994
Configuration Name: FF-LGYS4-AP01
question: {@{answerId=211535; questionId=1540; question=Physical Location; answer=Test; sequenceNumber=1.00; numberOfDecimals=0; fieldType=Text; requiredFlag=False}
When I run:
$UpdateParam = @{ grandparentId = 28994 parentId = 1540 id = 211535 Operation = 'replace' Path = 'answer' Value = 'Test2' } Update-CWMCompanyConfigurationTypeQuestionValue @UpdateParam
I get the following error:
Invoke-CWMWebRequest : An exception has been thrown. --> The remote server returned an error: (404) Not Found. An error has been thrown. --> { "code": "NotFound", "message": "Configuration Type Question Value 211535 not found" }
Any guidance on how to resolve this issue or insights about the correct usage would be greatly appreciated.