Promoting previous generation

オフライン

Hello

Im trying to promote a previous version of an item programatically can someone tell me how can i do that?

Parents
  • 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

Reply
  • 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

Children