Hi @HelesicPetr,
How can set serial effectivity with context and serial number for any child through API
Reference topic - https://community.ptc.com/t5/Windchill/API-for-setting-effectivity/m-p/294903#M34550
Hi @AA_9841156
Try the serialEffectivity class
WTSerialNumberedEffectivity eff = WTSerialNumberedEffectivity.newWTSerialNumberedEffectivity();
//... code to define all to effectivity
// assign the effectivity to object (WTPart/EPMDocument/WTDOcument/others objects)
EffectivityHelper.setEffectivityTarget(eff,wtpart);
PetrH
Hi @Per
Thanks for sharing solution btw i used below code and its working .have you any idea how to get all service effectivity from parts as stored in Manage applicability.
ServiceEffectivity se = ServiceEffectivity.newServiceEffectivity(part);
se.setEffContext((EffContext) parentpart.getMaster());
//se.setBeginSerialNumberRange(String.valueOf(startRange));
//se.setEndSerialNumberRange(String.valueOf(endRange));
se.setEffectivityType("serialNumber");
//WTPart p=(WTPart)se.getEffContext();
PersistenceHelper.manager.store(se);