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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

API to get WTPartRequest associated with WTPart

Sitanshu
5-Regular Member

API to get WTPartRequest associated with WTPart

Hi All,

Need to fetch all the WTPartRequest attached to a WTPart. If you have ready code available then please suggest.

Thanks

Sitanshu

3 REPLIES 3

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

Sitanshu
5-Regular Member
(To:ShirishMorkhade)

Thanks. But, I need related parts information. Untitled.png

 

mcastelletti
5-Regular Member
(To:Sitanshu)

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

Announcements

Top Tags