- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
We're creating an actionscript that spawns a new workspace item and performs a workflow transition on it, however we're having problems performing the transion using the performWorkflowTransition() function.
First we create the new workspace item from an actionascript which is contained in WS_WORKSPACE_A like this:
//Create new item with the values
var newItem = createNewItem('WS_WORKSPACE_B', newProperties);
Where newProperties is an array of the fields for the item. This part is tested and works.
Then we try and push the newly created item along a transition:
//Pushes the item to new state
newItem.performWorkflowTransition(348);
But we get this error: Item is not in correct state
Even though when we navigate to the newly created items workflow tab, we can see it is in the first state, and the transition comes from that first stte and carries it to another state.
Is it that the item isn't actually created until the script is finished executing? And as a result performWorkflowTransition() cannot be performed that soon?
Hope this makes sense!
Solved! Go to Solution.