Hi everyone,
I wrote a CWA to help bulk edit records, regardless their state.
Everything works fine exept for active quotes. If a quote is active and in progress, I put it in draft state, do the update and try to reactivate it via C# code:
SetStateRequest state = new SetStateRequest { State = new OptionSetValue(attribStateCode), //1 Status = new OptionSetValue(attribStatusCode), //1 EntityMoniker = entRef }; service.Execute(state);
The error message I get is quite confusing:
1 is not a valid status code for state code QuoteState.Active
Because statuscode 1 == In Progress.
Does anyone know what I am doing wrong?
*This post is locked for comments
Well...nevermind... I just realized, that the option set value of "In Progress" for Status "Active" is not '1' but '2'...
That does not realy make sense to me because my code reads the actual OptionSetValue and it reads '1'.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156