cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

URL to the latest version/iteration of wtparts or epm.docs

msoeborg
1-Visitor

URL to the latest version/iteration of wtparts or epm.docs

In our ERP-system it is possible to use hyperlinks. But how do i ensure that the url always point to the latest iteration and version. For me it is allright to create this link manual the first time, but the link must be "up to date" herafter. As far as I can see, the number given in the url is not logical with respect to the wtpart, and I see no system what so ever. Is there any symbols that can bee inserted together with the url, so that I am always directed to the latest version and iteration.
8 REPLIES 8

Add the number of the WTPart or the EPMDocument in your ERP-system. By using the number instead of the hyperlink to the particular html-page, your implementation will be far more robust. Somewhere in the admin guides, PTC says that the URL may change over time. In this case, you will be in the desert with your ERP-system filled with dead hyperlinks.

hi hugo i have same issue but, how can i give link if we use the number instead of hyperlink thank you in advance

Hello, if yor interesting I coud post java code for get last version and iteration of any Windchill object. Why that can't do you programmer?

"Feofilov Ivan" wrote:

Hello, if yor interesting I coud post java code for get last version and iteration of any Windchill object. Why that can't do you programmer?

hello Everybody, Here's how to get the link to use in another program. select trim(SUBSTR(a.DOCUMENTNUMBER,0,7)),b.IDA2A2 from (select IDA2A2,DOCUMENTNUMBER from PDM9.EPMDOCUMENTMASTER where DOCUMENTNUMBER LIKE'P%.%')a, pdm9.CONTROLBRANCH b Where a.IDA2A2 = b.IDA3B5;

Hi Ivan,

Please share your java code for getting last version and iteration of any Windchill object.

Thanks in advance.

rkayasth
10-Marble
(To:brawat)

Hello Ivan,

Can you post the code please?

Ravin Kayasth

KD
12-Amethyst
12-Amethyst
(To:rkayasth)

Hi Ravin,

You can use this code

/**

* Get latest Object.

*

* @param master

* Provide Master of the part.

* @return returns the latest object of related Part.

* @exception wt.util.WTException

* throws {@link wt.util.WTException}

*/

public static wt.enterprise.RevisionControlled getLatestObject(

wt.enterprise.Master master) throws wt.util.WTException {

if (master == null) {

throw new wt.util.WTException("Master can't be null");

}

QueryResult queryResult = null;

wt.enterprise.RevisionControlled latestObject = null;

try {

/* This method will return all the latest iteration of all the revision. */

queryResult = wt.vc.VersionControlHelper.service

.allVersionsOf(master);

if (queryResult.hasMoreElements()) {

latestObject = (wt.enterprise.RevisionControlled) queryResult

.nextElement();

}

} catch (wt.pom.PersistenceException e) {

e.printStackTrace();

}

return latestObject;

}

Have a look in this thread http://communities.ptc.com/thread/53151?tstart=0

Thanks,

Kaushik

Announcements


Top Tags