Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Hi
Can anybody provide java code example for part (WTPart) number change?
Thanks.
Solved! Go to Solution.
Hi,
Try this,
I am not sure which of them will work.
WTPartMaster wpm = (WTPartMaster) part.getMaster();
WTPartMasterIdentity masterIdentity = (WTPartMasterIdentity) wpm.getIdentificationObject();
masterIdentity.setNumber("new number");
masterIdentity.setName("new name");
IdentityHelper.service.changeIdentity(wpm, masterIdentity);
WTPartMaster master = part.getMaster();
<Use the setter methods to change values >
<save the master using PersistenceHelper>
PersistenceHelper.manager.save(master);
WTPartHelper.service.changeWTPartMasterIdentity(part.getMaster(), name, number, localWTOrganization);
Thanks and Regards,
Kaushik
Hi,
Try this,
I am not sure which of them will work.
WTPartMaster wpm = (WTPartMaster) part.getMaster();
WTPartMasterIdentity masterIdentity = (WTPartMasterIdentity) wpm.getIdentificationObject();
masterIdentity.setNumber("new number");
masterIdentity.setName("new name");
IdentityHelper.service.changeIdentity(wpm, masterIdentity);
WTPartMaster master = part.getMaster();
<Use the setter methods to change values >
<save the master using PersistenceHelper>
PersistenceHelper.manager.save(master);
WTPartHelper.service.changeWTPartMasterIdentity(part.getMaster(), name, number, localWTOrganization);
Thanks and Regards,
Kaushik