Hello
Im trying to promote a previous version of an item programatically can someone tell me how can i do that?
Hello
Im trying to promote a previous version of an item programatically can someone tell me how can i do that?
Hi Hkhan
Can you give the specific use case of this ? On which event you want to trigger this method ?
You can run below method to promote the item. (Ensure that, you elevate the logged in user based on the life cycle promotion role)
Item previousItem = innovator.newItem("Part","promoteItem");
previousItem.setID("ID of Previous Generation");
previousItem.setProperty("state", "Superseeded");
previousItem = previousItem.apply();
Thank You
Gopikrishnan R
Hi Hkhan
Can you give the specific use case of this ? On which event you want to trigger this method ?
You can run below method to promote the item. (Ensure that, you elevate the logged in user based on the life cycle promotion role)
Item previousItem = innovator.newItem("Part","promoteItem");
previousItem.setID("ID of Previous Generation");
previousItem.setProperty("state", "Superseeded");
previousItem = previousItem.apply();
Thank You
Gopikrishnan R
Thank you this works perfectly fine