Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hi All,
Need to fetch all the WTPartRequest attached to a WTPart. If you have ready code available then please suggest.
Thanks
Sitanshu
Hi @Sitanshu ,
Try using below snippet. I used this way before and sure if this is same API for latest WC release.
But it is worth to try this for latest release too:
WTCollection requests = new WTHashSet(); WTPartMaster master = (WTPartMaster)part.getMaster(); long partMasterId = master.getPersistInfo().getObjectIdentifier().getId(); QuerySpec qs = new QuerySpec(); int ind = qs.appendClassList(WTPartRequest.class, true); qs.appendWhere(new SearchCondition(WTPartRequest.class, WTPartRequest.RESULTING_PART_MASTER_REFERENCE + '.' + WTAttributeNameIfc.REF_OBJECT_ID, new long [] {partMasterId}), new int[]{ind}); QueryResult qr = PersistenceHelper.manager.find(qs);
I hope this helps you.
Regards,
Shirish
Thanks. But, I need related parts information.
Hi , were you founding a solution to retrieve the part request that was used to request that Wtpart?
So from the wtpart I would like to have a link to the wtpart request.
THX