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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

How to get Service Effectivity of a Parts List object?

SHRI_HARI
6-Contributor

How to get Service Effectivity of a Parts List object?

I am now working on a customization where I have to create an export of Parts List data in that particular Information Structure based on the Service Effectivities present in the Service Effectivity Filter. When I am trying to get the Service Effectivity of a Parts List object it is giving me zero value though the service effectivities has been defined in it. I was trying to use these methods to get the service effectivity of a Parts List object.

 

Method 1:

ServiceEffectivityDataServiceFactory serviceFactory1 = new ServiceEffectivityDataServiceFactory();
ServiceEffectivityDataService service1 = serviceFactory1.getServiceEffectivityDataServiceDelegate(partsList);
List<Persistable> effectvityonPartandPLItem = service1.getEffectivitiesForPersistable(persistable);

 

Method 2:

QueryResult qr = ServiceEffectivityHelper.service.getEffectivitiesFor(partsList);

 

Could you suggest me what mistake I made or is there any other alternative way to get the service effectivities of a parts list object?

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
HelesicPetr
22-Sapphire I
(To:SHRI_HARI)

Hi @SHRI_HARI 

 

Are the effectivity really from Service ?

 

Try to use an another API to get the standard effectivity 

wt.eff.EffHelper.service.getEffectivity(epm);

 

PetrH

View solution in original post

3 REPLIES 3
HelesicPetr
22-Sapphire I
(To:SHRI_HARI)

Hi @SHRI_HARI 

 

Are the effectivity really from Service ?

 

Try to use an another API to get the standard effectivity 

wt.eff.EffHelper.service.getEffectivity(epm);

 

PetrH

SHRI_HARI
6-Contributor
(To:HelesicPetr)

Hi HelesicPetr

 

Yes the effectivity is from Service and also when I tried to use this API I got this error.

 

class com.ptc.arbortext.windchill.partlist.PartList cannot be cast to class wt.eff.EffRecordable (com.ptc.arbortext.windchill.partlist.PartList and wt.eff.EffRecordable are in unnamed module of loader 'app')

HelesicPetr
22-Sapphire I
(To:SHRI_HARI)

Hi @SHRI_HARI 

You should use correct types in the method.

 

Why do you put the PartList to EffRecordable?  

 

The WTPart, or EPMDocument or WTDocument should be used as a input. 

 

PetrH

 

Top Tags