Skip to content
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

Update-CWMProductCatalog recurringFlag MissingRequiredField #53

Open
kgarbet opened this issue Jan 23, 2024 · 1 comment
Open

Update-CWMProductCatalog recurringFlag MissingRequiredField #53

kgarbet opened this issue Jan 23, 2024 · 1 comment

Comments

@kgarbet
Copy link

kgarbet commented Jan 23, 2024

Hello,

I'm attempting to run:
Update-CWMProductCatalog -id $CWProductCreated.id -Operation replace -Path recurringFlag -Value True

When i run this, i get an error:

Invoke-CWMWebRequest : An exception has been thrown.
--> The remote server returned an error: (400) Bad Request.
An error has been thrown.
-->
--> {
"code": "InvalidObject",
"message": "catalogItem object is invalid",
"errors": [
{
"code": "MissingRequiredField",
"message": "recurringBillCycle or recurringOneTimeFlag is required.",
"resource": "catalogItem",
"field": "recurringOneTimeFlag"
},
{
"code": "MissingRequiredField",
"message": "recurringBillCycle or recurringOneTimeFlag is required.",
"resource": "catalogItem",
"field": "recurringBillCycle/id"
}
]
}

Running these two command together doesn't work. I feel like I need to do them both in one command?
Update-CWMProductCatalog -id $CWProductCreated.id -Operation replace -Path 'recurringBillCycle' -Value @{'id' = '2'}
Update-CWMProductCatalog -id $CWProductCreated.id -Operation replace -Path recurringFlag -Value True

Am I right in thinking they need to be run together, is that even possible? or am I doing this the complete wrong way?

@damiankw
Copy link
Contributor

Hey @kgarbet, did you end up getting this to work? I'm running into the same issue and have found a workaround, but I had to change some of the Private functions to make it happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants