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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

hyper Link for object created feedback message

SP_9983246
1-Newbie

hyper Link for object created feedback message

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?

2 REPLIES 2

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.

Top Tags