Hi Ankit,
You can use the following Code to delete the latest iteration,
wt.vc.wip.Workable iterationObj = null; |
boolean isLatestIteration = false;
wt.fc.QueryResult result = wt.vc.VersionControlHelper.service.allIterationsFrom((wt.vc.Iterated)WTObject);
while (result.hasMoreElements() ){
WTObject tmpObj = (WTObject)result.nextElement();
if(WTObject instanceof WTPart){
WTPart part = (WTPart)tmpObj; | ||
isLatestIteration = part.isLatestIteration(); | ||
if(isLatestIteration){ | ||
iterationObj(part); | ||
break; | ||
} |
}
}
if( isLatestIteration ){
wt.vc.VersionControlHelper.service.deleteIterations((wt.vc.Iterated)iterationObj,(wt.vc.Iterated)iterationObj); | ||||||
strLogger.append(" :: Object Deleted :: Yes" ); |
}
BR
MKR