Article - CS301683
New iteration created with API VersionControlHelper.service.supersede carries attachment of predecessor iteration in Windchill PDMLink
Modified: 26-Feb-2019
Applies To
- Windchill PDMLink 11.0
Description
- New iteration created with API VersionControlHelper.service.supersede carries attachment of predecessor iteration even if, the iteration from which the new iteration is created won't have any attachment
- Steps to reproduce : Create a new iteration of document with this code
ObjectIdentifier oid = ObjectIdentifier.newObjectIdentifier("wt.doc.WTDocument:346323");
WTDocument my_persistable = (WTDocument) PersistenceHelper.manager.refresh(oid);
WTDocument newDoc = (WTDocument) VersionControlHelper.service.newIteration(my_persistable,true);
WTDocument latest = (WTDocument)VersionControlHelper.getLatestIteration(my_persistable, true);
newDoc =(WTDocument)VersionControlHelper.service.supersede(latest, newDoc);
VersionControlHelper.setIterationIdentifier((Iterated)newDoc,IterationIdentifier.newIterationIdentifier(Series.newSeries("wt.vc.IterationIdentifier", "3")));
newDoc = (WTDocument) PersistenceHelper.manager.store( newDoc );
This is a printer-friendly version of Article 301683 and may be out of date. For the latest version click CS301683