Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hi all,
The function below returns the creator of a wt.document, how (if possible) would it need to be changed in order to return the principal who last updated the document instead of it's creator?
public static WTUser getCreatedBy(WTObject pbo){
try {
pbo = (WTObject)PersistenceHelper.manager.refresh(pbo);
if (pbo instanceof RevisionControlled){
return (WTUser) ((RevisionControlled)pbo).getCreator().getPrincipal();
} else {
log.error("Object was not revision controlled");
return null;
}
} catch (WTException ex) {
log.error("Unable to find creator",ex);
return null;
}
}
Many thanks advance.
B
Solved! Go to Solution.
Yes. Call RevisionControlled.getModifier() instead
Yes. Call RevisionControlled.getModifier() instead
Thank you Mathew, it works like a charm.