<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Art Of Creation - Dynamics AX Blog &#187; Nice-to-haves</title>
	<atom:link href="http://www.artofcreation.be/tag/nice-to-haves/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.artofcreation.be</link>
	<description>The everyday life of a Dynamics AX developer</description>
	<lastBuildDate>Fri, 23 Jul 2010 16:29:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Five nice-to-haves in Dynamics AX</title>
		<link>http://www.artofcreation.be/2009/10/20/five-nice-to-haves-in-dynamics-ax/</link>
		<comments>http://www.artofcreation.be/2009/10/20/five-nice-to-haves-in-dynamics-ax/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 19:06:23 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[CLR]]></category>
		<category><![CDATA[Nice-to-haves]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=248</guid>
		<description><![CDATA[Here a some functionalities that I think are nice-to-haves in future versions of AX from a developer point of view. I hope they make sense :). 1. Select table where field in set Consider a situation where you have a set or container filled with recId&#8217;s. When you want to loop all records that have [...]]]></description>
			<content:encoded><![CDATA[<p>Here a some functionalities that I think are nice-to-haves in future versions of AX from a developer point of view. I hope they make sense :).</p>
<p><strong>1. Select table where field in set</strong><br />
Consider a situation where you have a set or container filled with recId&#8217;s. When you want to loop all records that have one of these recId&#8217;s, it would be nice to be able to write something like this:</p>
<div class="codecolorer-container xpp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="xpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Set &nbsp; &nbsp; &nbsp; &nbsp; set <span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> Set<span style="color: #000000;">&#40;</span>Types<span style="color: #00007f;">::</span><span style="color: #0000ff;">Int64</span><span style="color: #000000;">&#41;</span>;<br />
CustTable &nbsp; custTable;<br />
;<br />
<br />
set.<span style="color: #000000;">add</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">5637166082</span><span style="color: #000000;">&#41;</span>;<br />
set.<span style="color: #000000;">add</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">5637166083</span><span style="color: #000000;">&#41;</span>;<br />
<br />
<span style="color: #0000ff;">while</span> <span style="color: #0000ff;">select</span> custTable<br />
<span style="color: #0000ff;">where</span> custTable.<span style="color: #000000;">RecId</span> IN set <span style="color: #007f00;">// this will not compile!</span><br />
<span style="color: #000000;">&#123;</span><br />
<span style="color: #007f00;">// do stuff</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p>The only problem is that there is no &#8216;in&#8217; operator in AX. You will either have to loop the set and select each record one at the time, or you&#8217;ll have to use the Query and QueryBuildRange classes to make this work.<br />
The above example would be much nicer in my opinion.</p>
<p><strong>2. Throwable exception classes</strong><br />
It would be nice to be able to create your own exceptions.<br />
Java, for example, has Throwable and Exception classes that can be extended.<br />
I won&#8217;t say that I completely understand these java classes (I&#8217;m not a Java guy), but I believe it would force developers to catch only exceptions they can handle, and not just all exceptions.<br />
It would also make it possible to have more information as to why an exception has occoured when you catch it.</p>
<p><strong>3. Try &#8211; catch &#8211; finally</strong><br />
This is a classic: the try-catch-finally is not supported in AX. When we look at C# for example, a try-catch can have a &#8216;finally&#8217; block at the end. The code in this block is always executed, even if an exception occoured.</p>
<p><strong>4. Events using CLR Interop</strong><br />
CLR Interop does not support event handling in AX. It would be nice to be able to assign an event handler to an event, so an event can trigger functionality in AX without complicated workarounds involving .NET wrapper classes, infinite loops, services or other creative solutions. (I&#8217;m thinking about things like FileSystemWatcher).</p>
<p><strong>5. Code refactoring</strong><br />
When you rename an object in AX (Table, field, class, method, etc), there is no refactoring option. You have to manually rename all other instances of that object.<br />
For example: it would be nice if, when you rename a field, AX had the option to automatically update all methods, forms, etc, where this field was used.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2009/10/20/five-nice-to-haves-in-dynamics-ax/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
