<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Promoting previous generation</title><link>https://www.aras.com/community/f/development/37042/promoting-previous-generation</link><description>Hello 
 
 Im trying to promote a previous version of an item programatically can someone tell me how can i do that?</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Promoting previous generation</title><link>https://www.aras.com/community/thread/7765?ContentTypeID=1</link><pubDate>Tue, 23 Nov 2021 18:39:19 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:66508b0b-2b06-4840-8c62-62b6a832ecfc</guid><dc:creator>hkhan</dc:creator><description>&lt;p&gt;Thank you this works perfectly fine&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Promoting previous generation</title><link>https://www.aras.com/community/thread/7752?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 05:34:58 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:83fb7821-02b2-400b-a444-5c0cd926024a</guid><dc:creator>Gopikrishnan</dc:creator><description>&lt;p&gt;Hi Hkhan&lt;/p&gt;
&lt;p&gt;Can you give the specific use case of this ? On which event you want to trigger this method ?&lt;/p&gt;
&lt;p&gt;You can run below method to promote the item. (Ensure that, you elevate the logged in user based on the life cycle promotion role)&lt;/p&gt;
&lt;p&gt;Item previousItem = innovator.newItem(&amp;quot;Part&amp;quot;,&amp;quot;promoteItem&amp;quot;);&lt;br /&gt;previousItem.setID(&amp;quot;ID of Previous Generation&amp;quot;);&lt;br /&gt;previousItem.setProperty(&amp;quot;state&amp;quot;, &amp;quot;Superseeded&amp;quot;);&lt;br /&gt;previousItem = previousItem.apply();&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank You&lt;/p&gt;
&lt;p&gt;Gopikrishnan R&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>