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?
Solved! Go to Solution.
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
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
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')
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