<?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>How can i get ID of previous generation</title><link>https://www.aras.com/community/f/development/37041/how-can-i-get-id-of-previous-generation</link><description>Hello im trying to get ID of gen 2 in a variable in Csharp can someone tell me how i can do that? 
 
 ID Gen 
 1 1 
 2 2 
 3 3 
 4 4</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: How can i get ID of previous generation</title><link>https://www.aras.com/community/thread/7768?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2021 08:09:22 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:fdd5ff98-53af-452c-b7f8-526433001a48</guid><dc:creator>Gopikrishnan</dc:creator><description>&lt;p&gt;ge stand for greater than or equal to. Some other condition&amp;nbsp;are:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;eq equal&lt;br /&gt;ne not equal&lt;br /&gt;le less than or equal to&lt;br /&gt;gt greater than&lt;br /&gt;lt less than&lt;br /&gt;like&lt;br /&gt;not like&lt;br /&gt;between&lt;br /&gt;not between&lt;br /&gt;in&lt;br /&gt;is null&lt;br /&gt;is not null&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><item><title>RE: How can i get ID of previous generation</title><link>https://www.aras.com/community/thread/7766?ContentTypeID=1</link><pubDate>Tue, 23 Nov 2021 18:57:15 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:ffd49cff-c127-42e9-a2f7-5ecca5b933bc</guid><dc:creator>hkhan</dc:creator><description>&lt;p&gt;can you also tell what&amp;nbsp;&lt;span&gt;partItem.setPropertyCondition(&amp;quot;generation&amp;quot;, &amp;quot;ge&amp;quot;); does? like what does &amp;quot;ge&amp;quot; mean?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i get ID of previous generation</title><link>https://www.aras.com/community/thread/7755?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 05:54:12 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:eeadd67d-897e-4d4d-abce-2bb65ba8b194</guid><dc:creator>Gopikrishnan</dc:creator><description>&lt;p&gt;Hi HKhan&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know the contextItem of your method call. Assuming your method call contextItem is part, you can run below code snippet&lt;/p&gt;
&lt;p&gt;Innovator innovator = this.getInnovator();&lt;br /&gt;string configId = this.getProperty(&amp;quot;config_id&amp;quot;);&lt;br /&gt;Item partItem = innovator.newItem(&amp;quot;Part&amp;quot;,&amp;quot;get&amp;quot;);&lt;br /&gt;partItem.setProperty(&amp;quot;config_id&amp;quot;, configId);&lt;br /&gt;partItem.setProperty(&amp;quot;generation&amp;quot;, &amp;quot;0&amp;quot;);&lt;br /&gt;partItem.setAttribute(&amp;quot;select&amp;quot;, &amp;quot;id,generation&amp;quot;);&lt;br /&gt;partItem.setAttribute(&amp;quot;maxRecords&amp;quot;, &amp;quot;2&amp;quot;);&lt;br /&gt;partItem.setAttribute(&amp;quot;orderBy&amp;quot;, &amp;quot;generation DESC&amp;quot;);&lt;br /&gt;partItem.setPropertyCondition(&amp;quot;generation&amp;quot;, &amp;quot;ge&amp;quot;);&lt;br /&gt;partItem = partItem.apply();&lt;br /&gt;if(partItem.isError())&lt;br /&gt;{&lt;br /&gt; return innovator.newError(&amp;quot;Error getting partItem &amp;quot; +partItem.getErrorString());&lt;br /&gt;}&lt;br /&gt;if(partItem.getItemCount() &amp;gt; 1)&lt;br /&gt;{&lt;br /&gt; return innovator.newResult(&amp;quot;ID of Previous Generation is &amp;quot; +partItem.getItemByIndex(1).getID());&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt; return innovator.newError(&amp;quot;Previous Generation does not exist.&amp;quot;);&lt;br /&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>