<?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>promote() method</title><link>https://www.aras.com/community/f/development/3919/promote-method</link><description>Within a VB method being called on BeforeAdd for an Item, what is the proper syntax to promote new items to a specific Lifecycle state initially?

Me.setAction(&amp;quot;promoteItem&amp;quot;)
Me.setProperty(&amp;quot;state&amp;quot;,stateX)

or

Me.promote(???,StateX)</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: promote() method</title><link>https://www.aras.com/community/thread/2030?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 10:22:41 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:1da184fc-85df-48fd-a687-3d443c8d9942</guid><dc:creator>Christopher Gillis</dc:creator><description>Hello,

The &lt;strong&gt;promote&lt;/strong&gt; method available from Items is just a convenient shorthand to save time from manually setting the action and state of the item, but both of the code samples you&amp;#39;ve provided will make the same call to the server in the end. Because of this, there&amp;#39;s no &amp;quot;proper&amp;quot; syntax for promoting an item, but I&amp;#39;d recommend using &lt;strong&gt;Item.promote&lt;/strong&gt; for clarity and simplicity.

Chris

&lt;hr /&gt;

Christopher Gillis

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: promote() method</title><link>https://www.aras.com/community/thread/2029?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 10:07:33 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:3a71bbfe-06c9-4082-ab01-44db1e496c8e</guid><dc:creator>kentonvk</dc:creator><description>Either of those options would be acceptable. I should point out that the code snippets above are not actually completely identical. If you setAction and state, you must also do Me.Apply() to ensure the promotion is completed. In addition, the second option should be Me.promote(StateX, &amp;quot;&lt;em&gt;Some optional comment to store in the history record, if applicable.&lt;/em&gt;&amp;quot;)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>