Skip to main content
1-Visitor
December 7, 2015
Solved

In a validator or filter, how to get the Parent Part when a child part is selected.

  • December 7, 2015
  • 1 reply
  • 1599 views

I would like to know how to get the Parent of an Part when a child is selected within a BOM structure. The API WTPartHelper.service.getUsedByWTParts(pm1) will not work as it would return all the Parts and there is no way to identify the immediate Parent.

Best answer by rl-2

Solution: Type cast UIValidationCriteria to CATUIValidationCriteria and use the method getSelectedParentContextObject() to get the immediate parent of selected part within the tree structure.

1 reply

rl-21-VisitorAuthorAnswer
1-Visitor
December 8, 2015

Solution: Type cast UIValidationCriteria to CATUIValidationCriteria and use the method getSelectedParentContextObject() to get the immediate parent of selected part within the tree structure.