<?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>Apply AML</title><link>https://www.aras.com/community/f/development/3528/apply-aml</link><description>hello

I am trying to create method using apply AML

here is my method but it shows some error

Innovator inn = this.getInnovator();
string AML =&amp;quot;&amp;lt;AML&amp;gt;&amp;lt;Item type=&amp;#39;apn_assembly01&amp;#39;action=&amp;#39;get&amp;#39;/&amp;gt;&amp;lt;/AML&amp;gt;&amp;quot;;
Item result = inn.applyAML(AML);

what I am missing</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Apply AML</title><link>https://www.aras.com/community/thread/1201?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2018 02:20:07 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:3f5cf595-a0de-4305-bf43-e3aff3b2aae1</guid><dc:creator>Former Member</dc:creator><description>hi 
Christopher Gillis.thanks fr reply.


yeah..we can use API.
but requirement is through AML query.


Yess. now its working fine&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Apply AML</title><link>https://www.aras.com/community/thread/1199?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2018 01:56:32 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:07554771-e473-4715-9674-cb0467c7fc4f</guid><dc:creator>Former Member</dc:creator><description>hi

Angela thanks fr rply.

but If I had clesed query by &amp;lt;/Item&amp;gt; it gives below error

Details in 6 temporary files

C:\Program Files (x86)\Aras11\Innovator\Innovator\Server\dll\jxw5nspk

Line number -4, Error Number: CS0161, &amp;#39;PKG_inf_applyAML_A1_9B4E9E7C26A53C9B.ItemMethod.methodCode()&amp;#39;: not all code paths return a value.

&amp;nbsp;

&amp;nbsp;

if I wont add it shows - method not specified fully.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Apply AML</title><link>https://www.aras.com/community/thread/1197?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2018 01:52:16 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:e500998e-597a-4c38-be76-890533bfc094</guid><dc:creator>Former Member</dc:creator><description>hello Mahmoud thanks for reply.

i have check the space also not using bold font.
error- method not fully specified.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Apply AML</title><link>https://www.aras.com/community/thread/1198?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 10:18:24 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:651dd0d2-69a0-49bf-9f32-24523bd75c07</guid><dc:creator>Christopher Gillis</dc:creator><description>Hello,

I believe Leo is correct. In your AML query, there should be a space between your type and action attributes as shown in his comment. Please note that the quotation marks used in these forums seem to be different than the ones expected in the method editor, so be careful about copying and pasting the code directly from his comment.

Another potential issue is that all server methods expect a return value of an Item object. You can resolve this issue by returning the result of your AML query with &lt;code&gt;return result;&lt;/code&gt;.

Lastly, I want to mention that you can take advantage of the built-in API to avoid needing to use an AML inside of your server methods at all. You can see how you could perform the same query using the API below.

&lt;pre&gt;&lt;code&gt;Innovator inn = this.getInnovator();
Item part = inn.newItem(&amp;quot;Part&amp;quot;, &amp;quot;get&amp;quot;);
part = part.apply();&lt;/code&gt;&lt;/pre&gt;


Chris

______________________________________________

Christopher Gillis

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Apply AML</title><link>https://www.aras.com/community/thread/1193?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 08:11:10 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:5b5abe3d-f174-4114-9358-44a4781342ed</guid><dc:creator>AngelaIp</dc:creator><description>Maybe you forgot the close Item tag &amp;lt;/Item&amp;gt;?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Apply AML</title><link>https://www.aras.com/community/thread/1192?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 07:55:17 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:b6d4df2a-3658-48d4-a117-fc039b910d60</guid><dc:creator>Former Member</dc:creator><description>Apart from the missing space in your AML request your code seems to work :

&lt;code&gt;string AML =”&amp;lt;AML&amp;gt;&amp;lt;Item type=’apn_assembly01’ action=’get’/&amp;gt;&amp;lt;/AML&amp;gt;”;&lt;/code&gt;

&amp;nbsp;

Léo&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Apply AML</title><link>https://www.aras.com/community/thread/1191?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 07:44:55 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:fba4f3af-3245-44b8-99b4-dca86124672b</guid><dc:creator>Former Member</dc:creator><description>What is the error?

You can check your AML also under nash and have a better error description

&lt;strong&gt;&amp;lt;SERVER&amp;gt;/&lt;/strong&gt;Innovatorserver/Client/&lt;strong&gt;X-salt=std_11.0.0.6549-X&lt;/strong&gt;/scripts/nash.aspx

You have to change the bolded text with the server URL that you have&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>