Community
I can't seem to find the correct function to change an Item's LifeCycle state. EditItemLifeCycleStates says "To change the state, call SetItemLifeCycleStates. Next, commit the change by calling UpdateItemRevisions." I can't find SetItemLifeCycleStates, and I used UpdateItemRevisions but it doesn't actually change the state. What is the correct function to use for this?
<ns:EditItemLifeCycleStates> <!--Optional:--> <ns:itemRevisionIds> <!--Zero or more repetitions:--> <ns:long>149544</ns:long> </ns:itemRevisionIds> </ns:EditItemLifeCycleStates>
Then I tried:
<ns:UpdateLifeCycleStates> <!--Optional:--> <ns:itemIds> <!--Zero or more repetitions:--> <ns:long>161402</ns:long> </ns:itemIds> <ns:lifeCycleState>2</ns:lifeCycleState> <ns:applyToChildren>0</ns:applyToChildren> </ns:UpdateLifeCycleStates>
That's a typo in the documentation. The correct sequence of functions is
The sample code in the documentation should be correct. The ItemEditor sample in the SDK should also have an example of this workflow.