Get WTChangeReview objects from WTPart
Mar 06, 2023
02:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Mar 06, 2023
02:21 AM
Get WTChangeReview objects from WTPart
I'm looking for an API to get all the WTChangeReview objects from a WTPart.
as shown.
Solved! Go to Solution.
Labels:
- Labels:
-
API
ACCEPTED SOLUTION
Accepted Solutions
Mar 06, 2023
02:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Mar 06, 2023
02:43 AM
This code search the Change Review links from object WTPart WTDocument CADDocument what ever you can link to the Change Review
WTPart eventPart = UtilWTPart.getPartLatestIteration("00000005171"); // custom method to seach WTPart by number
ChangeableIfc changableObject = eventPart;
String targetRole = "theChangeReview";
Class<ChangeReview> targetClass = ChangeReview.class;
Class<ChangeReviewItemLink> linkClass = ChangeReviewItemLink.class;
QueryResult resultObject =
ChangeHelper2.service.getLatestChangeItem(changableObject, targetRole, targetClass, linkClass, false);// search for the linked Change reviews
If you change false to true in the method then you will get directly Change Review objects instead of links
ChangeHelper2.service.getLatestChangeItem(changableObject, targetRole, targetClass, linkClass, ture);//
PetrH
1 REPLY 1
Mar 06, 2023
02:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Mar 06, 2023
02:43 AM
This code search the Change Review links from object WTPart WTDocument CADDocument what ever you can link to the Change Review
WTPart eventPart = UtilWTPart.getPartLatestIteration("00000005171"); // custom method to seach WTPart by number
ChangeableIfc changableObject = eventPart;
String targetRole = "theChangeReview";
Class<ChangeReview> targetClass = ChangeReview.class;
Class<ChangeReviewItemLink> linkClass = ChangeReviewItemLink.class;
QueryResult resultObject =
ChangeHelper2.service.getLatestChangeItem(changableObject, targetRole, targetClass, linkClass, false);// search for the linked Change reviews
If you change false to true in the method then you will get directly Change Review objects instead of links
ChangeHelper2.service.getLatestChangeItem(changableObject, targetRole, targetClass, linkClass, ture);//
PetrH
![](/skins/images/695EE5AD3E567050FEDD72575855ED93/ptc_skin/images/icon_anonymous_message.png)