Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hi All,
I have created a Custom Action link, which triggered an jsp page.
This custom Action is made available on Right Click actions and Details page action of an object.
now i want to get the selected object details like name, number on .jsp page. how i can achieve this.
i have tried "NmCommandBean".
Please let me know if you have any information on this.
Regards,
Vivek
Vivek Uchekar wrote:
Hi All,
I have created a Custom Action link, which triggered an jsp page.
This custom Action is made available on Right Click actions and Details page action of an object.
now i want to get the selected object details like name, number on .jsp page. how i can achieve this.
i have tried "NmCommandBean".
You can try something like the following:
<%@ include file="/netmarkets/jsp/components/beginWizard.jspf"%>
<%@ include file="/netmarkets/jsp/components/includeWizBean.jspf"%>
<%
Object context = commandBean.getPageOid().getRefObject();//get the right clicked object
WTPart wtp = (WTPart)context;//assume object was a WTPart
%>
<br>Part name = <%=wtp.getName() %> number = <%=wtp.getNumber() %>
You also need to check out Felco Solution's "Windchill Customization" course:
This is an excellent course.
You should create the Pet example from scratch using the Customizer's guide for this reason.
If you use a debugger, you can actually see multiple NmCommandBeans being exchanged back and forth between client and server. Sometimes they are arrays or collections of NmCommandBeans. There is a chance that your code is peering into the wrong NmCommandBean, but without more detail, no further assistance can be provided.
I should also add that the action you created likely has a problem in its cnfiguration. NmCommandBeans do act wierd when there is a flaw in action configuration.