<?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 to use getid() method to get id?</title><link>https://www.aras.com/community/f/development/55322/how-to-use-getid-method-to-get-id</link><description>In the system the &amp;quot;Id&amp;quot;, and &amp;quot;config-id&amp;quot; are the item name. For Document item, the id is the document name(screenshot below). I need the id property, the one that is unique, to be added to the properties of Document item. 
 I have this method but it doesn</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to use getid() method to get id?</title><link>https://www.aras.com/community/thread/10545?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2024 13:09:00 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:12c395ea-febe-46ca-b6e9-94c6ad93d688</guid><dc:creator>AJ Sebastian</dc:creator><description>&lt;p&gt;It might be a case sensitivity issue in that instance. Your properties name is guid, and the label is GUID. In your method try changing it to lowercase and see if that helps?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use getid() method to get id?</title><link>https://www.aras.com/community/thread/10541?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2024 21:17:08 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:7d88b85d-7504-494b-a4b1-19ea73abf84e</guid><dc:creator>Hargul Sidhu</dc:creator><description>&lt;p&gt;&lt;span&gt;Thanks for the prompt reply&amp;nbsp;&lt;/span&gt;&lt;a class="ui-contentpeek internal-link view-user-profile" href="/community/members/asebastian" data-contentid="0ebdb40c0dce47a2b651a5ed53621720" data-contenttypeid="e9ed411860ed4f2ba0265705b8793d05"&gt;AJ Sebastian&lt;/a&gt;&lt;span&gt;&amp;nbsp; Unfortunately, things don&amp;#39;t work on my end.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;I added the method but I don&amp;#39;t get the ID in the GUID column in the search grid, screenshot below. Am I missing something?&amp;nbsp;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="/community/resized-image/__size/640x480/__key/communityserver-discussions-components-files/3/pastedimage1725052617615v1.png" alt=" " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use getid() method to get id?</title><link>https://www.aras.com/community/thread/10539?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2024 17:34:25 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:fb3e78a8-f152-482a-81ca-99785dd6aada</guid><dc:creator>AJ Sebastian</dc:creator><description>&lt;p&gt;Interesting! That&amp;#39;s a new use case. I&amp;#39;d recommend:&lt;br /&gt;&lt;br /&gt;Create a new property on Document called GUID.&lt;/p&gt;
&lt;p&gt;Create an onAfterAdd server event which sets the GUID when a new document is created.&lt;/p&gt;
&lt;p&gt;Attach the following method:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;var inn = this.getInnovator();
this.setAction(&amp;quot;edit&amp;quot;);
this.setProperty(&amp;quot;GUID&amp;quot;,this.getID());
this.apply();

return this;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This will set the GUID for all Future documents. If you want to do it to existing ones you&amp;#39;d have to get them all in a method and loop through them. It&amp;#39;s a one time operation to set the ID &amp;gt; GUID.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;AJ&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use getid() method to get id?</title><link>https://www.aras.com/community/thread/10538?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2024 16:56:44 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:b9aa1c0c-eb43-465a-9424-271f30025d06</guid><dc:creator>Hargul Sidhu</dc:creator><description>&lt;p&gt;Hi AJ, thanks for replying. The issue is that there is no property of the Document item that has a &amp;quot;ID&amp;quot; . The id are just the Document item_number(screenshot below). I want the unique IDs, the value in &amp;lt;id&amp;gt; tag, to be displayed in the search grid. I don&amp;#39;t want to change the current Data Source of the ID property. I want to add a new property, say GUID, that will show the unique id in the search grid.&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="/community/resized-image/__size/640x480/__key/communityserver-discussions-components-files/3/Snipaste_5F00_2024_2D00_08_2D00_30_5F00_09_2D00_45_2D00_50.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use getid() method to get id?</title><link>https://www.aras.com/community/thread/10537?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2024 15:26:23 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:78ea1285-7151-4554-93b0-9650635820d9</guid><dc:creator>AJ Sebastian</dc:creator><description>&lt;p&gt;Hi Hargul,&lt;/p&gt;
&lt;p&gt;I think your error is not related to your use of getID(). The error specifies that your code doesn&amp;#39;t return properly. Make sure your method ends with the return of an item, or if you only need to return a string you can return inn.newResult(&amp;quot;STRING&amp;quot;);&lt;/p&gt;
&lt;p&gt;For what you&amp;#39;re trying to achieve, I am not sure I understand the use case. Are you trying to modify the document and set the ID to a different property? With more context I believe I could better help you here.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;AJ&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>