Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hello all,
Need your help, I created one Action button which will create a new document in windchill. But once the document is created we get success feedback message in OOTB with an hyper like to the info page of newly created document.
but I tried all the API which are available but unable to create that hyper link.
can any one help me. How to get that hyperlink?
Hi @SP_9983246
Here is a code that generate a link to the object detail page
public static String getURLDetail(Persistable persistObject)
{
String retValue = "";
if (persistObject == null)
{
return retValue;
}
try
{
NmOid workOid = new NmOid();
workOid.setRef(persistObject);
NmAction workNmAction = persistObject instanceof LifeCycleManagedWtMarkUp ?
NmActionServiceHelper.service.getAction("clashReport", "viewClashReport") :
NmActionServiceHelper.service.getAction("object", "view");
workNmAction.setContextObject(workOid);
retValue = workNmAction.getActionUrlExternal();
} catch (Exception e)
{
;
}
return retValue;
}
PetrH
Hello @SP_9983246
It looks like you have a response from a community member. If the reply helped you solve your question please mark the reply as the Accepted Solution.
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.
Thanks,
Community Moderation Team.