Message 1 of 3
performWorkflowTransition on revisioning item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I have a revision ctrl WS where I want to be able to check a box on an item release it via onEdit script.
var statusUnreleased = "Unreleased";
var actionRelease = "Release Doc";
var actionNewVersion = "Revise Doc";
var wsLockRev = 'WS_LOCK_REVISIONS';
lock();
function lock(){
if(!item.LOCK_REVISION || !item.descriptor.revisionList[0].working) return;
var newLockRev = createItem(wsLockRev);
var wfItem = newLockRev.workflowItems.addItem({RELATED:item});
var state = item.descriptor.dvi.lifecycleState.stateName;
wfItem.lifecycle = (state === statusUnreleased) ? actionRelease : actionNewVersion;
newLockRev.performWorkflowTransition(4218); //release revision
}
The code everything it is suppose except the revisioning item hasn't been able to grab the revision from the item I am passing through.
is there a workaround or a way to achieve this?