Community Tip - You can change your system assigned username to something more personal in your community settings. X
Thanks Antonio and Jess. I am looking for confirmation from the community. PTC is telling me:
Object URL’s might not change for point releases like between M020 and M050, but they will change between 9.0 and 9.1. It will depend on how the source code is structured in the Windchill release. Also, this is not a recommended way of referring to documents because any changes to the file structure (file path in the source) would render the URL invalid. The best way to maintain references is by referring to the Document Number & Name pair rather than a link.
Jason Kritter
Sandia National Laboratories
Dept. 2994 - Engineering Tools Development
Phone: (505) 284-1466
E-mail: -
I know with WTChangeRequest2 you can:
if(your WTChangeRequest2.isLatest())
{code}
but with WTDocument that code is not avaliable.
I have made the simple code below but was wondering if anyone had a faster solution?
where qr is a query result returning all the iterations of a doc i passed in.
String rev=" ;
while (qr.hasMoreElements()){
wt.doc.WTDocument doc = (wt.doc.WTDocument)qr.nextElement();
String revision = doc.getVersionDisplayIdentity().toString();
if(doc.isLatestIteration()){
String a = doc.getVersionDisplayIdentity().toString();
if (a.compareTo(rev)>0){
rev = doc.getVersionDisplayIdentity().toString();
name = doc.toString();}
}
}
This will return the latest revision and latest iteration. and then i can place the string that is returned into a JSP page hyperlink that works fine.
Thanks