
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
I have the same question (0)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'.