<?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>What is equivalent to &amp;quot;SetAttribute&amp;quot; function in REST API?</title><link>https://www.aras.com/community/f/development/36129/what-is-equivalent-to-setattribute-function-in-rest-api</link><description>We have several server methods which expects custom attribute values using &amp;quot;getAttribute&amp;quot;. While we can pass the property value in the API call, I am not sure how do we pass custom attribute values to the server method call??</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: What is equivalent to "SetAttribute" function in REST API?</title><link>https://www.aras.com/community/thread/5931?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 12:24:18 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:9b27e868-8dda-46d9-ae32-4379841b3cbc</guid><dc:creator>Sathish</dc:creator><description>&lt;p&gt;Hello Sunil,&lt;/p&gt;
&lt;p&gt;Thanks for your answer. However, I would like to know the equivalent of Attributes. this.setAttribute() and this.getAttribute() instead of Property.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What is equivalent to "SetAttribute" function in REST API?</title><link>https://www.aras.com/community/thread/5930?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 12:21:00 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:decc04f6-9a49-4eb2-b862-7f5f41f7606f</guid><dc:creator>SunilReddy</dc:creator><description>&lt;p&gt;Hello Sathish, If I understand your query properly, Passing the input value for your server method through API right, here is the sample&lt;/p&gt;
&lt;p&gt;I have a method called &amp;quot;addPart&amp;quot; with the below code&lt;/p&gt;
&lt;p&gt;Innovator inn=this.getInnovator();&lt;br /&gt;string itemnumber=this.getProperty(&amp;quot;item_number&amp;quot;);&lt;br /&gt;Item partItem=inn.newItem(&amp;quot;Part&amp;quot;,&amp;quot;add&amp;quot;);&lt;br /&gt;partItem.setProperty(&amp;quot;item_number&amp;quot;,itemnumber);&lt;br /&gt;Item result=partItem.apply();&lt;/p&gt;
&lt;p&gt;return this;&lt;/p&gt;
&lt;p&gt;and API call is&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot; your server url/ &lt;span&gt;server/ odata/ method.addPart&lt;/span&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;body for the above call is&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;{&lt;br /&gt;&amp;quot;@odata.type&amp;quot;:&amp;quot;your server url/data/$metadata#Part&amp;quot;,&lt;br /&gt;&amp;quot;item_number&amp;quot; : &amp;quot;EasePLM_Sunny_009&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Reading Itemnumber from the call and passing that to above method&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>