Hi Kaushik,
I've had a little success with the below mentioned code:
public class CustomWTPartMover implements RemoteAccess{
public static void PartMover(WTPart part)
{
System.out.println("try started");
try {
ObjectIdentifier oid2 = ObjectIdentifier.newObjectIdentifier("wt.pdmlink.PDMLinkProduct:12551258277");
System.out.println(" My Product Found");
PDMLinkProduct product = (PDMLinkProduct) PersistenceHelper.manager.refresh(oid2);
System.out.println("Product Refreshed");
Folder folder = FolderHelper.service.getFolder("/Default/NewPart", (WTContainerRef)product.getContainerReference());
System.out.println("Folder Found");
FolderHelper.service.changeFolder((FolderEntry)part, folder);
/*
WTValuedHashMap map = new WTValuedHashMap();
map.put((FolderEntry)part,folder);
System.out.println("Folder mapped");
ContainerMoveHelper.service.moveAllVersions(map);
*/
System.out.println("Change Folder successfully!!!!!");
}
catch (WTException e) {
e.printStackTrace();
}
}}
The problem is, the program doesn't recognize the Product, instead move the object to Organization/Folders. Any help here?
Thanks,
Wasim