<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Greg On Dynamics Ax</title>
	<atom:link href="https://gregondax.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://gregondax.wordpress.com</link>
	<description>Random thoughts about development using Dynamics AX and .Net</description>
	<lastBuildDate>Wed, 05 Oct 2011 07:41:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='gregondax.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://s0.wp.com/i/buttonw-com.png</url>
		<title>Greg On Dynamics Ax</title>
		<link>https://gregondax.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://gregondax.wordpress.com/osd.xml" title="Greg On Dynamics Ax" />
	<atom:link rel='hub' href='https://gregondax.wordpress.com/?pushpress=hub'/>
	<item>
		<title>X++ for .Net Developers (.Net Rocks! Interview)</title>
		<link>https://gregondax.wordpress.com/2011/10/05/x-for-net-developers-net-rocks-interview/</link>
					<comments>https://gregondax.wordpress.com/2011/10/05/x-for-net-developers-net-rocks-interview/#respond</comments>
		
		<dc:creator><![CDATA[gregondax]]></dc:creator>
		<pubDate>Wed, 05 Oct 2011 07:41:07 +0000</pubDate>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[x++ Language]]></category>
		<guid isPermaLink="false">http://gregondax.wordpress.com/?p=388</guid>

					<description><![CDATA[I recently had an interview with Carl and Richard at .Net Rocks about what .Net developers need to know about AX. The show went live yesterday &#8211; you can check it out here: http://www.dotnetrocks.com/default.aspx?showNum=703.]]></description>
										<content:encoded><![CDATA[<p>I recently had an interview with Carl and Richard at .Net Rocks about what .Net developers need to know about AX. </p>
<p>The show went live yesterday &#8211; you can check it out here: <a href="http://www.dotnetrocks.com/default.aspx?showNum=703." title="http://www.dotnetrocks.com/default.aspx?showNum=703.">http://www.dotnetrocks.com/default.aspx?showNum=703.</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://gregondax.wordpress.com/2011/10/05/x-for-net-developers-net-rocks-interview/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/f6c9a48786510b8bdaf4e54e93d2311327ecf2a5e14e80e00bfccf95a0cfcb44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Greg</media:title>
		</media:content>
	</item>
		<item>
		<title>Refactoring a long parameter list of boolean flags</title>
		<link>https://gregondax.wordpress.com/2010/02/26/refactoring-a-long-parameter-list-of-boolean-flags/</link>
					<comments>https://gregondax.wordpress.com/2010/02/26/refactoring-a-long-parameter-list-of-boolean-flags/#comments</comments>
		
		<dc:creator><![CDATA[gregondax]]></dc:creator>
		<pubDate>Fri, 26 Feb 2010 08:15:17 +0000</pubDate>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[x++ Language]]></category>
		<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Dynamics Ax]]></category>
		<category><![CDATA[Dynamics Ax 2009]]></category>
		<category><![CDATA[Dynamics Ax 4.0]]></category>
		<category><![CDATA[Microsoft Dynamics Ax]]></category>
		<guid isPermaLink="false">http://gregondax.wordpress.com/?p=316</guid>

					<description><![CDATA[If you have had&#160;the need to have a method accept many boolean arguments, you might design the method to accept a number of optional boolean parameters, such as: This is not the best design. For a start if you are happy to accept all the defaults but want to archive the printout you&#8217;ll need to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you have had&nbsp;the need to have a method accept many boolean arguments, you might design the method to accept a number of optional boolean parameters, such as:</p>
<pre class="brush: java; title: ; notranslate">
public void print(boolean _proforma = false, boolean _hideFooter = false, boolean _hideHeader= false, boolean _archive = false)
</pre>
<p>This is not the best design. For a start if you are happy to accept all the defaults but want to archive the printout you&#8217;ll need to call the method like this:</p>
<pre class="brush: java; title: ; notranslate">
print(false, false, false, true);
</pre>
<p>It also suffers from what refactoring practitioners call a &#8220;bad smell&#8221; &#8211; this one being a long parameter list, which makes it harder to read and understand, and gets worse over time as new arguments are added.</p>
<p>A refactoring to improve the design might be to introduce a (single) settings object to replace the parameters.<br />
If you consider that to be overkill you may want to consider this alternative: replace the parameters with a <STRONG>single </STRONG>base Enum type:</p>
<p><A href="https://gregondax.wordpress.com/wp-content/uploads/2010/02/bitwiseenum.png"><IMG class="aligncenter size-full wp-image-342" title="Enumerated type used for bitwise parameter" alt="" src="https://gregondax.wordpress.com/wp-content/uploads/2010/02/bitwiseenum.png" width="300" height="207"></A></p>
<p>Each enumeration element then has a value that maps to the two base binary. So the values for this base enum would be:</p>
<p><UL></p>
<p><LI>Proforma &#8211; 1</LI></p>
<p><LI>HideFooter &#8211; 2</LI></p>
<p><LI>HideHeader &#8211; 4</LI></p>
<p><LI>Archive &#8211; 8</LI><br />
</UL><br />
This enables us to declare our print method like so:</p>
<pre class="brush: java; title: ; notranslate">
public void print(DEV_PrintOptions _opts)
{
if ((_opts &amp; DEV_PrintOptions::Proforma) == DEV_PrintOptions::Proforma)
// Do proforma stuff

if ((_opts &amp; DEV_PrintOptions::HideFooter) == DEV_PrintOptions::HideFooter)
// Hide the footer

if ((_opts &amp; DEV_PrintOptions::HideHeader) == DEV_PrintOptions::HideHeader)
// Hide the header

if ((_opts &amp; DEV_PrintOptions::Archive) == DEV_PrintOptions::Archive)
// Archive the printout
}
</pre>
<p>Which allows the method to be called in a more flexible way, specifying only the options you wish to override, for example:</p>
<pre class="brush: java; title: ; notranslate">
// print out proforma and archive it (accepting the default to print the footer and header):
print(Dev_PrintOptions::Proforma | Dev_PrintOptions::Archive);
</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://gregondax.wordpress.com/2010/02/26/refactoring-a-long-parameter-list-of-boolean-flags/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/f6c9a48786510b8bdaf4e54e93d2311327ecf2a5e14e80e00bfccf95a0cfcb44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Greg</media:title>
		</media:content>
	</item>
		<item>
		<title>Automated Messaging to Office Communicator (from code)</title>
		<link>https://gregondax.wordpress.com/2010/01/18/automated-messaging-to-office-communicator-from-code/</link>
					<comments>https://gregondax.wordpress.com/2010/01/18/automated-messaging-to-office-communicator-from-code/#respond</comments>
		
		<dc:creator><![CDATA[gregondax]]></dc:creator>
		<pubDate>Mon, 18 Jan 2010 08:02:33 +0000</pubDate>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[x++ Language]]></category>
		<category><![CDATA[Dynamics Ax]]></category>
		<category><![CDATA[Dynamics Ax 2009]]></category>
		<category><![CDATA[Microsoft Dynamics Ax]]></category>
		<guid isPermaLink="false">http://gregondax.wordpress.com/?p=319</guid>

					<description><![CDATA[A new feature introduced with Dynamics AX 2009 was integration with Office Communicator. This enables the presence of a person/contact to be shown as part of the contact information, along with links to contact that person: Selecting the link to send an instant message to a contact launches the Office Communicator client conversation: The following [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>A new feature introduced with Dynamics AX 2009 was integration with Office Communicator.</p>
<p>This enables the presence of a person/contact to be shown as part of the contact information, along with links to contact that person:</p>
<div data-shortcode="caption" id="attachment_320" style="width: 415px" class="wp-caption aligncenter"><a href="https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorintegration.png"><img aria-describedby="caption-attachment-320" data-attachment-id="320" data-permalink="https://gregondax.wordpress.com/2010/01/18/automated-messaging-to-office-communicator-from-code/officecommunicatorintegration/" data-orig-file="https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorintegration.png" data-orig-size="405,295" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="officeCommunicatorIntegration" data-image-description="" data-image-caption="&lt;p&gt;Office Communicator integration with Dynamics AX&lt;/p&gt;
" data-medium-file="https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorintegration.png?w=300" data-large-file="https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorintegration.png?w=405" class="size-full wp-image-320" title="officeCommunicatorIntegration" src="https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorintegration.png?w=700" alt="Office Communicator integration with Dynamics AX"   srcset="https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorintegration.png 405w, https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorintegration.png?w=150&amp;h=109 150w, https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorintegration.png?w=300&amp;h=219 300w" sizes="(max-width: 405px) 100vw, 405px" /></a><p id="caption-attachment-320" class="wp-caption-text">Office Communicator integration with Dynamics AX</p></div>
<p>Selecting the link to send an instant message to a contact launches the Office Communicator client conversation:<br />
<a href="https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorclient.png"><img data-attachment-id="328" data-permalink="https://gregondax.wordpress.com/2010/01/18/automated-messaging-to-office-communicator-from-code/officecommunicatorclient/" data-orig-file="https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorclient.png" data-orig-size="354,342" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="officeCommunicatorClient" data-image-description="" data-image-caption="" data-medium-file="https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorclient.png?w=300" data-large-file="https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorclient.png?w=354" src="https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorclient.png?w=700" alt="Office Communicator Client" title="officeCommunicatorClient"   class="aligncenter size-full wp-image-328" srcset="https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorclient.png 354w, https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorclient.png?w=150&amp;h=145 150w, https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorclient.png?w=300&amp;h=290 300w" sizes="(max-width: 354px) 100vw, 354px" /></a></p>
<p>The following job shows how to send an instant message to a contact using Office Communicator from code:</p>
<pre class="brush: java; title: ; notranslate">
static void UCMAExample(Args _args)
{
    AlertSender.OCS_Sender ocSender;
    ;

    try
    {
        ocSender = new AlertSender.OCS_Sender(@&quot;sip:Administrator@contoso.com&quot;, &quot;ax-srv-03.contoso.com&quot;,
                                                        &quot;Administrator&quot;, @&quot;thepassword&quot;, &quot;contoso&quot;);
        ocSender.SendMessage(&quot;sip:Alicia@contoso.com&quot;, &quot;Hello from AX&quot;, &quot;Normal&quot;);
    }
    catch(Exception::CLRError)
    {
        throw error(AifUtil::getClrErrorMessage());
    }
}
</pre>
<p>To enable this you will need to install the UCMA redistributable, available as part of the UCMA SDK download:<br />
<a title="Microsoft download center - Microsoft Unified Communications Managed API SDK" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=b30306e4-7dc1-44d2-9a68-9b4a6fc5c2df&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=b30306e4-7dc1-44d2-9a68-9b4a6fc5c2df&amp;displaylang=en</a></p>
<p>You will also need to modify, compile and add the AlertSender.OCS_Sender .Net reference to AX, which is available to download here:<br />
<a title="Microsoft download center - Custom Alerting - Microsoft Office Communications Server 2007 API Sample" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=9EFC784B-E443-4441-926C-5FD405D41BD9&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyId=9EFC784B-E443-4441-926C-5FD405D41BD9&amp;displaylang=en</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://gregondax.wordpress.com/2010/01/18/automated-messaging-to-office-communicator-from-code/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/f6c9a48786510b8bdaf4e54e93d2311327ecf2a5e14e80e00bfccf95a0cfcb44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Greg</media:title>
		</media:content>

		<media:content url="https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorintegration.png" medium="image">
			<media:title type="html">officeCommunicatorIntegration</media:title>
		</media:content>

		<media:content url="https://gregondax.wordpress.com/wp-content/uploads/2010/01/officecommunicatorclient.png" medium="image">
			<media:title type="html">officeCommunicatorClient</media:title>
		</media:content>
	</item>
		<item>
		<title>Solving an &#8216;Object object has not been initialized&#8217; runtime error</title>
		<link>https://gregondax.wordpress.com/2009/11/23/solving-an-object-object-has-not-been-initialized-runtime-error/</link>
					<comments>https://gregondax.wordpress.com/2009/11/23/solving-an-object-object-has-not-been-initialized-runtime-error/#respond</comments>
		
		<dc:creator><![CDATA[gregondax]]></dc:creator>
		<pubDate>Mon, 23 Nov 2009 08:30:47 +0000</pubDate>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[x++ Language]]></category>
		<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Dynamics Ax]]></category>
		<category><![CDATA[Dynamics Ax 2009]]></category>
		<category><![CDATA[Dynamics Ax 4.0]]></category>
		<category><![CDATA[Microsoft Dynamics Ax]]></category>
		<guid isPermaLink="false">http://gregondax.wordpress.com/?p=287</guid>

					<description><![CDATA[If you have received the error below, and are scratching your head over the cause: Then the answer is to check&#160;you have called super() in your constructor. The compilation output will also display a warning to that effect: Related notes about extending Object and initialization Unlike C#, Object is not implicitly extended when creating a [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you have received the error below, and are scratching your head over the cause:</p>
<p><IMG class="aligncenter size-full wp-image-292" title="objectNotInitialized" alt="Object object not initialised error" src="https://gregondax.wordpress.com/wp-content/uploads/2009/11/objectnotinitialized.png" width="377" height="224"></p>
<p>Then the answer is to check&nbsp;you have called super() in your constructor. The compilation output will also display a warning to that effect:</p>
<p><IMG title="noSuperCallInNew" alt="Compile warning for not overriding super in constructor" src="https://gregondax.wordpress.com/wp-content/uploads/2009/11/nosupercallinnew.png" width="700" height="163"></p>
<p><STRONG><SPAN style="text-decoration:underline;">Related notes about extending Object and initialization</SPAN></STRONG></p>
<p>Unlike C#, Object is not implicitly extended when creating a new class. You&#8217;ll need to ensure that the &#8216;extends object&#8217; class declaration is included if you want to call methods declared in Object, eg:</p>
<p><IMG class="aligncenter size-full wp-image-289" title="extendsObject" alt="extendsObject" src="https://gregondax.wordpress.com/wp-content/uploads/2009/11/extendsobject.png" width="513" height="206"></p>
<p>Repeating the aforementioned error (and also unlike C#) the base constructor is not implicitly called in X++:</p>
<pre class="brush: java; title: ; notranslate">
void new()
{
;
super(); //base constructor is not called implicitly
}
</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://gregondax.wordpress.com/2009/11/23/solving-an-object-object-has-not-been-initialized-runtime-error/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/f6c9a48786510b8bdaf4e54e93d2311327ecf2a5e14e80e00bfccf95a0cfcb44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Greg</media:title>
		</media:content>
	</item>
		<item>
		<title>AIF Pipeline Example</title>
		<link>https://gregondax.wordpress.com/2009/10/26/aif-pipeline-example/</link>
					<comments>https://gregondax.wordpress.com/2009/10/26/aif-pipeline-example/#comments</comments>
		
		<dc:creator><![CDATA[gregondax]]></dc:creator>
		<pubDate>Mon, 26 Oct 2009 07:00:26 +0000</pubDate>
				<category><![CDATA[AIF]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[x++ Language]]></category>
		<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Dynamics Ax]]></category>
		<category><![CDATA[Dynamics Ax 2009]]></category>
		<category><![CDATA[Dynamics Ax 4.0]]></category>
		<category><![CDATA[Microsoft Dynamics Ax]]></category>
		<guid isPermaLink="false">http://gregondax.wordpress.com/?p=256</guid>

					<description><![CDATA[In my last post (Top 5 AIF Development Tips and Tricks) I mentioned how you can use the AIF to transform external messages into the format that AX expects. This post elaborates upon that tip with a more detailed example. Suppose you want to import currency exchange rates. AX has an action for this out [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In my last post (<a href="https://gregondax.wordpress.com/2009/09/24/top-5-aif-development-tips-and-tricks/">Top 5 AIF Development Tips and Tricks</a>) I mentioned how you can use the AIF to transform external messages into the format that AX expects. This post elaborates upon that tip with a more detailed example.</p>
<p>Suppose you want to import currency exchange rates.</p>
<p>AX has an action for this out of the box &#8211; createListExchangeRates, and will happily accept a message similar to this:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;ExchangeRates xmlns=&quot;http://schemas.microsoft.com/dynamics/2006/02/documents/ExchangeRates&quot;&gt;
    &lt;DocPurpose&gt;Original&gt;/DocPurpose&gt;
    &lt;ExchRates&gt;
        &lt;CurrencyCode&gt;GBP&lt;/CurrencyCode&gt;
        &lt;ExchRate&gt;1.71&lt;/ExchRate&gt;
        &lt;FromDate&gt;2009-09-21&lt;FromDate&gt;
        &lt;ToDate&gt;2009-09-22&lt;/ToDate&gt;
    &lt;/ExchRates&gt;
&lt;/ExchangeRates&gt;
</pre>
<p>Thats all well and good if you have control over the schemas of any inbound messages.<br />
Most likely this is not the case, say for example you want to import the exchange rates for the euro from the european central banks daily published list (<a href="http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml">http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml</a>).</p>
<p>If you try and receive this it will fail on two counts:<br />
1) It is not wrapped in an envelope (which is used by the AIF to identify the message sender and destiation) and<br />
2) the format of the exchange rate does not match AX schema.</p>
<p>To solve problem 1) you can make use of the &#8216;Wrap XML in AIF envlope&#8217; program available from axaptapedia here:<a href="http://www.axaptapedia.com/AIFEnvelopeTool">www.axaptapedia.com/AIFEnvelopeTool</a></p>
<p>To solve 2) you can use the pipeline to specify an XSLT to transform the message, the XSLT to perform the transformation for this example is:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; 
  xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; 
  xmlns:ax=&quot;http://schemas.microsoft.com/dynamics/2006/02/documents/ExchangeRates&quot; 
  xmlns:ext=&quot;http://www.ecb.int/vocabulary/2002-08-01/eurofxref&quot; 
  xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; 
  xmlns:gesmes=&quot;http://www.gesmes.org/xml/2002-08-01&quot; 
  exclude-result-prefixes=&quot;ext xs xsi xsl gesmes&quot; 
  xmlns=&quot;http://schemas.microsoft.com/dynamics/2006/02/documents/ExchangeRates&quot;&gt;    
  &lt;xsl:namespace-alias stylesheet-prefix=&quot;ax&quot; result-prefix=&quot;#default&quot; /&gt;
    &lt;xsl:output method=&quot;xml&quot; encoding=&quot;UTF-8&quot; indent=&quot;yes&quot; /&gt;
    &lt;xsl:template match=&quot;gesmes:Envelope&quot;&gt;
      &lt;ax:ExchangeRates&gt;          
          &lt;xsl:variable name=&quot;root&quot; select=&quot;.&quot; /&gt;          
          &lt;xsl:for-each select=&quot;$root/ext:Cube/ext:Cube&quot;&gt;
            &lt;xsl:variable name=&quot;xrateDate&quot; select=&quot;$root/ext:Cube/ext:Cube/@time&quot; /&gt;
              &lt;xsl:for-each select=&quot;$root/ext:Cube/ext:Cube/ext:Cube&quot;&gt;
              &lt;ax:ExchRates&gt;
                &lt;xsl:attribute name=&quot;class&quot;&gt;
                  &lt;xsl:value-of select=&quot;'entity'&quot; /&gt;
                &lt;/xsl:attribute&gt;
                &lt;ax:CurrencyCode&gt;
                  &lt;xsl:value-of select=&quot;@currency&quot; /&gt;
                &lt;/ax:CurrencyCode&gt;
                &lt;ax:ExchRate&gt;
                  &lt;xsl:value-of select=&quot;@rate&quot; /&gt;
                &lt;/ax:ExchRate&gt;
                &lt;ax:FromDate&gt;
                  &lt;xsl:value-of select=&quot;$xrateDate&quot; /&gt;
                &lt;/ax:FromDate&gt;
                &lt;ax:ToDate&gt;
                  &lt;xsl:value-of select=&quot;$xrateDate&quot; /&gt;
                &lt;/ax:ToDate&gt;
              &lt;/ax:ExchRates&gt;
            &lt;/xsl:for-each&gt;
          &lt;/xsl:for-each&gt;        
      &lt;/ax:ExchangeRates&gt;         
    &lt;/xsl:template&gt;  
&lt;/xsl:stylesheet&gt;
</pre>
<p>After running the AIF inbound service upon last weeks exchange rates it results in the following data being created (US Dollar highlighted):<br />
<div data-shortcode="caption" id="attachment_280" style="width: 607px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-280" data-attachment-id="280" data-permalink="https://gregondax.wordpress.com/2009/10/26/aif-pipeline-example/xratesaxform/" data-orig-file="https://gregondax.wordpress.com/wp-content/uploads/2009/10/xratesaxform.jpg" data-orig-size="597,360" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="xRatesAXForm" data-image-description="" data-image-caption="&lt;p&gt;Exchange rates AX form&lt;/p&gt;
" data-medium-file="https://gregondax.wordpress.com/wp-content/uploads/2009/10/xratesaxform.jpg?w=300" data-large-file="https://gregondax.wordpress.com/wp-content/uploads/2009/10/xratesaxform.jpg?w=597" src="https://gregondax.wordpress.com/wp-content/uploads/2009/10/xratesaxform.jpg?w=700" alt="Exchange rates AX form" title="xRatesAXForm"   class="size-full wp-image-280" srcset="https://gregondax.wordpress.com/wp-content/uploads/2009/10/xratesaxform.jpg 597w, https://gregondax.wordpress.com/wp-content/uploads/2009/10/xratesaxform.jpg?w=150&amp;h=90 150w, https://gregondax.wordpress.com/wp-content/uploads/2009/10/xratesaxform.jpg?w=300&amp;h=181 300w" sizes="(max-width: 597px) 100vw, 597px" /><p id="caption-attachment-280" class="wp-caption-text">Exchange rates AX form</p></div></p>
]]></content:encoded>
					
					<wfw:commentRss>https://gregondax.wordpress.com/2009/10/26/aif-pipeline-example/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/f6c9a48786510b8bdaf4e54e93d2311327ecf2a5e14e80e00bfccf95a0cfcb44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Greg</media:title>
		</media:content>

		<media:content url="https://gregondax.wordpress.com/wp-content/uploads/2009/10/xratesaxform.jpg" medium="image">
			<media:title type="html">xRatesAXForm</media:title>
		</media:content>
	</item>
		<item>
		<title>Top 5 AIF Development Tips and Tricks</title>
		<link>https://gregondax.wordpress.com/2009/09/24/top-5-aif-development-tips-and-tricks/</link>
					<comments>https://gregondax.wordpress.com/2009/09/24/top-5-aif-development-tips-and-tricks/#comments</comments>
		
		<dc:creator><![CDATA[gregondax]]></dc:creator>
		<pubDate>Thu, 24 Sep 2009 13:23:25 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[x++ Language]]></category>
		<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Dynamics Ax]]></category>
		<category><![CDATA[Dynamics Ax 2009]]></category>
		<category><![CDATA[Dynamics Ax 4.0]]></category>
		<category><![CDATA[Microsoft Dynamics Ax]]></category>
		<guid isPermaLink="false">http://gregondax.wordpress.com/?p=221</guid>

					<description><![CDATA[1. Enable the debugger You will notice, if you put a breakpoint into your document class, that when you run the associated action, the breakpoint will get ignored &#8211; leaving you in the dark. This is because the action is called using a &#8216;runas&#8217; function call  to change the user executing the code. To workaround this [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>1. Enable the debugger</strong></p>
<p>You will notice, if you put a breakpoint into your document class, that when you run the associated action, the breakpoint will get ignored &#8211; leaving you in the dark. This is because the action is called using a &#8216;runas&#8217; function call  to change the user executing the code.</p>
<p>To workaround this replace the runas method calls with direct calls in\Classes\AifOutboundProcessingService\ and \Classes\AifInboundProcessingService, eg:</p>
<pre class="brush: java; title: ; notranslate">
/*
runas(message.sourceEndpointAxUserId(),
classnum(AifInboundProcessingService),
staticmethodstr(AifInboundProcessingService, processAsUser),
[message.pack(), messageId]);
*/
AifInboundProcessingService::processAsUser([message.pack(), messageId]);
</pre>
<p><strong>2. Run jobs instead of waiting for batch processing</strong></p>
<p>The usual way for the AIF to run is using the batch processing framework, where you setup an interval for the inbound and outbound processing  to run.  This minute or so can feel like an age when you are in the middle of developing:<strong><br />
</strong></p>
<p><strong> </strong></p>
<div data-shortcode="caption" id="attachment_230" style="width: 310px" class="wp-caption aligncenter"><strong><strong><img aria-describedby="caption-attachment-230" loading="lazy" data-attachment-id="230" data-permalink="https://gregondax.wordpress.com/2009/09/24/top-5-aif-development-tips-and-tricks/aifbatch/" data-orig-file="https://gregondax.wordpress.com/wp-content/uploads/2009/09/aifbatch.png" data-orig-size="734,351" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="aifBatch" data-image-description="" data-image-caption="&lt;p&gt;AIF batch processing&lt;/p&gt;
" data-medium-file="https://gregondax.wordpress.com/wp-content/uploads/2009/09/aifbatch.png?w=300" data-large-file="https://gregondax.wordpress.com/wp-content/uploads/2009/09/aifbatch.png?w=700" class="size-medium wp-image-230" title="aifBatch" src="https://gregondax.wordpress.com/wp-content/uploads/2009/09/aifbatch.png?w=300&#038;h=143" alt="AIF batch processing" width="300" height="143" srcset="https://gregondax.wordpress.com/wp-content/uploads/2009/09/aifbatch.png?w=300 300w, https://gregondax.wordpress.com/wp-content/uploads/2009/09/aifbatch.png?w=600 600w, https://gregondax.wordpress.com/wp-content/uploads/2009/09/aifbatch.png?w=150 150w" sizes="(max-width: 300px) 100vw, 300px" /></strong></strong><p id="caption-attachment-230" class="wp-caption-text">AIF batch processing</p></div>
<p><strong> </strong></p>
<p>So use a custom job to have the AIF run instantly at the click of a button, here is an example of the receive job:</p>
<pre class="brush: java; title: ; notranslate">

static void runAIFReceive(Args _args)
{
AifGatewayReceiveService aifGatewayReceiveService;
AifInboundProcessingService aifInboundProcessingService;
;

aifGatewayReceiveService = new AifGatewayReceiveService();
aifGatewayReceiveService.run();
aifInboundProcessingService = new AifInboundProcessingService();
aifInboundProcessingService.run(true);  // pass true for debug mode
}

</pre>
<p><strong>3. Use file adapters</strong></p>
<p><strong><img loading="lazy" data-attachment-id="236" data-permalink="https://gregondax.wordpress.com/2009/09/24/top-5-aif-development-tips-and-tricks/fileadapter/" data-orig-file="https://gregondax.wordpress.com/wp-content/uploads/2009/09/fileadapter.png" data-orig-size="581,257" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="fileAdapter" data-image-description="" data-image-caption="" data-medium-file="https://gregondax.wordpress.com/wp-content/uploads/2009/09/fileadapter.png?w=300" data-large-file="https://gregondax.wordpress.com/wp-content/uploads/2009/09/fileadapter.png?w=581" class="aligncenter size-medium wp-image-236" title="fileAdapter" src="https://gregondax.wordpress.com/wp-content/uploads/2009/09/fileadapter.png?w=300&#038;h=132" alt="fileAdapter" width="300" height="132" srcset="https://gregondax.wordpress.com/wp-content/uploads/2009/09/fileadapter.png?w=300 300w, https://gregondax.wordpress.com/wp-content/uploads/2009/09/fileadapter.png?w=150 150w, https://gregondax.wordpress.com/wp-content/uploads/2009/09/fileadapter.png 581w" sizes="(max-width: 300px) 100vw, 300px" /><br />
</strong></p>
<p>When using the AIF, you will most likely be using a Biztalk, Web service or MSMQ adapter. Testing actions using one of these adapters can be a pain as you will most likely require another program to send or receive the message.</p>
<p>To get around this you can use a file adapter during testing, so that you can just write the message in plain XML and drop the file into a directory on your file system to be processed.</p>
<p>Then when you are finished testing / developing you can easily swap the file adapter out.</p>
<p><strong>4. Compose messages with the Visual Studio XML editor</strong></p>
<p>During development (when you use a file adapter), you  can create the message using notepad or any other text editor. I recommend using the Visual Studio XML editor to quickly compose these to take advantage of intellisense, schema validation and other useful features (like inserting a guid):</p>
<p><img loading="lazy" data-attachment-id="247" data-permalink="https://gregondax.wordpress.com/2009/09/24/top-5-aif-development-tips-and-tricks/xmleditvs2008/" data-orig-file="https://gregondax.wordpress.com/wp-content/uploads/2009/09/xmleditvs2008.png" data-orig-size="964,522" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="xmlEditVS2008" data-image-description="" data-image-caption="" data-medium-file="https://gregondax.wordpress.com/wp-content/uploads/2009/09/xmleditvs2008.png?w=300" data-large-file="https://gregondax.wordpress.com/wp-content/uploads/2009/09/xmleditvs2008.png?w=700" class="aligncenter size-full wp-image-247" title="xmlEditVS2008" src="https://gregondax.wordpress.com/wp-content/uploads/2009/09/xmleditvs2008.png?w=700&#038;h=379" alt="xmlEditVS2008" width="700" height="379" srcset="https://gregondax.wordpress.com/wp-content/uploads/2009/09/xmleditvs2008.png?w=700&amp;h=379 700w, https://gregondax.wordpress.com/wp-content/uploads/2009/09/xmleditvs2008.png?w=150&amp;h=81 150w, https://gregondax.wordpress.com/wp-content/uploads/2009/09/xmleditvs2008.png?w=300&amp;h=162 300w, https://gregondax.wordpress.com/wp-content/uploads/2009/09/xmleditvs2008.png?w=768&amp;h=416 768w, https://gregondax.wordpress.com/wp-content/uploads/2009/09/xmleditvs2008.png 964w" sizes="(max-width: 700px) 100vw, 700px" /></p>
<p><strong>5. Use the pipeline</strong></p>
<p>It is unlikely (if you are integrating with a third party) that the XML schemas  of the external system match those in AX.</p>
<p>To transform the message into the format AX can handle you can use the pipeline to add a component to run an xslt on the inbound XML:</p>
<p><img loading="lazy" data-attachment-id="250" data-permalink="https://gregondax.wordpress.com/2009/09/24/top-5-aif-development-tips-and-tricks/pipelineconfig/" data-orig-file="https://gregondax.wordpress.com/wp-content/uploads/2009/09/pipelineconfig.png" data-orig-size="674,266" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="pipelineConfig" data-image-description="" data-image-caption="" data-medium-file="https://gregondax.wordpress.com/wp-content/uploads/2009/09/pipelineconfig.png?w=300" data-large-file="https://gregondax.wordpress.com/wp-content/uploads/2009/09/pipelineconfig.png?w=674" class="aligncenter size-full wp-image-250" title="pipelineConfig" src="https://gregondax.wordpress.com/wp-content/uploads/2009/09/pipelineconfig.png?w=700" alt="pipelineConfig"   srcset="https://gregondax.wordpress.com/wp-content/uploads/2009/09/pipelineconfig.png 674w, https://gregondax.wordpress.com/wp-content/uploads/2009/09/pipelineconfig.png?w=150&amp;h=59 150w, https://gregondax.wordpress.com/wp-content/uploads/2009/09/pipelineconfig.png?w=300&amp;h=118 300w" sizes="(max-width: 674px) 100vw, 674px" /></p>
<p>You can also create custom pipeline components, see this link for more information &#8211;</p>
<p><strong><a href="http://msdn.microsoft.com/en-us/dynamics/ax/cc664615.aspx">How Do I: Create a Custom AIF Pipeline Component?</a><br />
</strong></p>
]]></content:encoded>
					
					<wfw:commentRss>https://gregondax.wordpress.com/2009/09/24/top-5-aif-development-tips-and-tricks/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/f6c9a48786510b8bdaf4e54e93d2311327ecf2a5e14e80e00bfccf95a0cfcb44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Greg</media:title>
		</media:content>

		<media:content url="https://gregondax.wordpress.com/wp-content/uploads/2009/09/aifbatch.png?w=300" medium="image">
			<media:title type="html">aifBatch</media:title>
		</media:content>

		<media:content url="https://gregondax.wordpress.com/wp-content/uploads/2009/09/fileadapter.png?w=300" medium="image">
			<media:title type="html">fileAdapter</media:title>
		</media:content>

		<media:content url="https://gregondax.wordpress.com/wp-content/uploads/2009/09/xmleditvs2008.png" medium="image">
			<media:title type="html">xmlEditVS2008</media:title>
		</media:content>

		<media:content url="https://gregondax.wordpress.com/wp-content/uploads/2009/09/pipelineconfig.png" medium="image">
			<media:title type="html">pipelineConfig</media:title>
		</media:content>
	</item>
		<item>
		<title>Spell check text box &#8211; Example of a WPF control in AX</title>
		<link>https://gregondax.wordpress.com/2009/07/23/spell-check-text-box-example-of-a-wpf-control-in-ax/</link>
					<comments>https://gregondax.wordpress.com/2009/07/23/spell-check-text-box-example-of-a-wpf-control-in-ax/#comments</comments>
		
		<dc:creator><![CDATA[gregondax]]></dc:creator>
		<pubDate>Thu, 23 Jul 2009 07:00:08 +0000</pubDate>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Dynamics Ax]]></category>
		<category><![CDATA[Dynamics Ax 2009]]></category>
		<category><![CDATA[Dynamics Ax 4.0]]></category>
		<category><![CDATA[Microsoft Dynamics Ax]]></category>
		<guid isPermaLink="false">http://gregondax.wordpress.com/?p=150</guid>

					<description><![CDATA[This post shows how to add &#8216;Microsoft Word&#8217; like spell checking to standard AX forms, taking the label editor as an example: When a word is misspelled it will underline that word red, and right-clicking will show a context menu with alternative suggestions. The user control and xpo are both available to download, with instructions [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>This post shows how to add &#8216;Microsoft Word&#8217; like spell checking to standard AX forms, taking the label editor as an example:</p>
<div data-shortcode="caption" id="attachment_206" style="width: 710px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-206" loading="lazy" data-attachment-id="206" data-permalink="https://gregondax.wordpress.com/2009/07/23/spell-check-text-box-example-of-a-wpf-control-in-ax/spellcheckctrlpreview/" data-orig-file="https://gregondax.wordpress.com/wp-content/uploads/2009/07/spellcheckctrlpreview.png" data-orig-size="803,365" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="spellCheckCtrlPreview" data-image-description="" data-image-caption="&lt;p&gt;Spell check control in AX&lt;/p&gt;
" data-medium-file="https://gregondax.wordpress.com/wp-content/uploads/2009/07/spellcheckctrlpreview.png?w=300" data-large-file="https://gregondax.wordpress.com/wp-content/uploads/2009/07/spellcheckctrlpreview.png?w=700" class="size-full wp-image-206" title="spellCheckCtrlPreview" src="https://gregondax.wordpress.com/wp-content/uploads/2009/07/spellcheckctrlpreview.png?w=700&#038;h=318" alt="Spell check control in AX" width="700" height="318" srcset="https://gregondax.wordpress.com/wp-content/uploads/2009/07/spellcheckctrlpreview.png?w=700&amp;h=318 700w, https://gregondax.wordpress.com/wp-content/uploads/2009/07/spellcheckctrlpreview.png?w=150&amp;h=68 150w, https://gregondax.wordpress.com/wp-content/uploads/2009/07/spellcheckctrlpreview.png?w=300&amp;h=136 300w, https://gregondax.wordpress.com/wp-content/uploads/2009/07/spellcheckctrlpreview.png?w=768&amp;h=349 768w, https://gregondax.wordpress.com/wp-content/uploads/2009/07/spellcheckctrlpreview.png 803w" sizes="(max-width: 700px) 100vw, 700px" /><p id="caption-attachment-206" class="wp-caption-text">Spell check control in AX</p></div>
<p>When a word is misspelled it will underline that word red, and right-clicking will show a context menu with alternative suggestions.</p>
<p>The user control and xpo are both available to download, with instructions to install at axaptapedia (see link at the bottom of this post).</p>
<p><strong>How it was built</strong></p>
<p>The first step is to create the user control in Visual Studio 2008.</p>
<p>All there is to the user control is a WPF Textbox &#8211; which has spell checking built in!<br />
All you need to do is set the SpellCheck.IsEnabled property::</p>
<pre class="brush: xml; title: ; notranslate">
&lt;TextBox Name=&quot;textBox&quot; SpellCheck.IsEnabled=&quot;True&quot; Language=&quot;en-gb&quot;&gt;&lt;/TextBox&gt;
</pre>
<p>This user control then needs to be exposed as an ActiveX to be used in Dynamics AX. (A very helpful colleague of mine gave me some guidance on this.)</p>
<p>Please see this link (<a href="http://msdn.microsoft.com/en-us/library/aa970266.aspx">MSDN Tutorial: Create a Win32 Application Hosting WPF Content</a>) for an example on how to do this.</p>
<p><strong>To automatically deploy to clients</strong></p>
<p>In AX, make use of the SysFileDeployer framework. To do this subclass SysFileDeploymentDLL, ensuring that you override the filename method to return the name of your library.</p>
<p>Also if you have developed a .Net WPF control you will need to register the library using regasm instead of regsvr32, so make sure you override (or inherit) the register and unregister methods so that regasm is used:</p>
<pre class="brush: java; title: ; notranslate">
class SysFileDeployment_DevWpf extends SysFileDeploymentDLL
{
 #Define.regasmCommand(@&#039;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe&#039;)
}

public Filename filename()
{
 return &#039;WpfTextBoxControlLibActiveX.dll&#039;;
}

protected void register(boolean atReboot = false)
{
 ;
 WinAPI::setCurrentDirectory(this.destinationPath());
 //TODO Check regasm executable exists on client?
 WinAPI::shellExecute(#regasmCommand, strfmt(&#039;&quot;%1&quot; %2&#039;, this.destinationPath()+this.filename(),&#039;/codebase&#039;));
}

protected void unRegister()
{
 ;
 WinAPI::setCurrentDirectory(this.destinationPath());
 //TODO Check regasm executable exists on client?
 WinAPI::shellExecute(#regasmCommand, this.destinationPath()+this.filename()+&#039; /unregister&#039;);
}

</pre>
<p>Then add your class(es) to the SysFileDeployer filesToDeploy method:</p>
<pre class="brush: java; title: ; notranslate">
private static container filesToDeploy()
{
 ;
 return [classnum(SysFileDeployment_DevWpfMainControl), classnum(SysFileDeployment_DevWpf)];
}
</pre>
<p>Then ensure that your dll&#8217;s are shared on your server (copy them to your  %AXDIR%/50/Client/Share/Include directory on your AOS server) and either update the application version of AX, or delete the usage data for the SysFileDeployer job for each client, then each client that starts up will get the option to deploy your new libraries:</p>
<p><img loading="lazy" data-attachment-id="211" data-permalink="https://gregondax.wordpress.com/2009/07/23/spell-check-text-box-example-of-a-wpf-control-in-ax/clientfiledeployment/" data-orig-file="https://gregondax.wordpress.com/wp-content/uploads/2009/07/clientfiledeployment.png" data-orig-size="408,203" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="clientFileDeployment" data-image-description="" data-image-caption="" data-medium-file="https://gregondax.wordpress.com/wp-content/uploads/2009/07/clientfiledeployment.png?w=300" data-large-file="https://gregondax.wordpress.com/wp-content/uploads/2009/07/clientfiledeployment.png?w=408" class="aligncenter size-full wp-image-211" title="clientFileDeployment" src="https://gregondax.wordpress.com/wp-content/uploads/2009/07/clientfiledeployment.png?w=700" alt="clientFileDeployment"   srcset="https://gregondax.wordpress.com/wp-content/uploads/2009/07/clientfiledeployment.png 408w, https://gregondax.wordpress.com/wp-content/uploads/2009/07/clientfiledeployment.png?w=150&amp;h=75 150w, https://gregondax.wordpress.com/wp-content/uploads/2009/07/clientfiledeployment.png?w=300&amp;h=149 300w" sizes="(max-width: 408px) 100vw, 408px" /></p>
<p>Download the control and example xpo <a href="http://www.axaptapedia.com/images/0/07/WpfTextBoxControl.zip">here from axaptapedia</a><br />
The steps for installing the control into your label editor <a href="http://www.axaptapedia.com/Form_Control_With_Spell_Checking">can also be found here at axaptapedia</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://gregondax.wordpress.com/2009/07/23/spell-check-text-box-example-of-a-wpf-control-in-ax/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/f6c9a48786510b8bdaf4e54e93d2311327ecf2a5e14e80e00bfccf95a0cfcb44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Greg</media:title>
		</media:content>

		<media:content url="https://gregondax.wordpress.com/wp-content/uploads/2009/07/spellcheckctrlpreview.png" medium="image">
			<media:title type="html">spellCheckCtrlPreview</media:title>
		</media:content>

		<media:content url="https://gregondax.wordpress.com/wp-content/uploads/2009/07/clientfiledeployment.png" medium="image">
			<media:title type="html">clientFileDeployment</media:title>
		</media:content>
	</item>
		<item>
		<title>X++ and C# Compared</title>
		<link>https://gregondax.wordpress.com/2009/06/12/xplusplus-and-csharp-compared/</link>
					<comments>https://gregondax.wordpress.com/2009/06/12/xplusplus-and-csharp-compared/#respond</comments>
		
		<dc:creator><![CDATA[gregondax]]></dc:creator>
		<pubDate>Fri, 12 Jun 2009 09:00:25 +0000</pubDate>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[x++ Language]]></category>
		<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Dynamics Ax]]></category>
		<category><![CDATA[Dynamics Ax 2009]]></category>
		<category><![CDATA[Microsoft Dynamics Ax]]></category>
		<guid isPermaLink="false">http://gregondax.wordpress.com/?p=167</guid>

					<description><![CDATA[With the advent of Dynamics AX 2009, the need for AX developers to know .Net is increasing. I have noticed the AX developer documentation on MSDN getting better and better, here is a section comparing X++ and C# that is well worth a read, check it out!: Dynamics AX MSDN Developer Center &#8211; X++ and C# [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>With the advent of Dynamics AX 2009, the need for AX developers to know .Net is increasing.</p>
<p>I have noticed the AX developer documentation on MSDN getting better and better, here is a section comparing X++ and C# that is well worth a read, check it out!:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/cc967357.aspx"><img loading="lazy" data-attachment-id="174" data-permalink="https://gregondax.wordpress.com/2009/06/12/xplusplus-and-csharp-compared/xpluspluscsharpcompared/" data-orig-file="https://gregondax.wordpress.com/wp-content/uploads/2009/06/xpluspluscsharpcompared.jpg" data-orig-size="1157,855" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="X++ and C# Comparisons" data-image-description="" data-image-caption="" data-medium-file="https://gregondax.wordpress.com/wp-content/uploads/2009/06/xpluspluscsharpcompared.jpg?w=300" data-large-file="https://gregondax.wordpress.com/wp-content/uploads/2009/06/xpluspluscsharpcompared.jpg?w=700" class="aligncenter size-full wp-image-174" title="X++ and C# Comparisons" src="https://gregondax.wordpress.com/wp-content/uploads/2009/06/xpluspluscsharpcompared.jpg?w=700&#038;h=517" alt="X++ and C# Comparisons" width="700" height="517" srcset="https://gregondax.wordpress.com/wp-content/uploads/2009/06/xpluspluscsharpcompared.jpg?w=700&amp;h=517 700w, https://gregondax.wordpress.com/wp-content/uploads/2009/06/xpluspluscsharpcompared.jpg?w=150&amp;h=111 150w, https://gregondax.wordpress.com/wp-content/uploads/2009/06/xpluspluscsharpcompared.jpg?w=300&amp;h=222 300w, https://gregondax.wordpress.com/wp-content/uploads/2009/06/xpluspluscsharpcompared.jpg?w=768&amp;h=568 768w, https://gregondax.wordpress.com/wp-content/uploads/2009/06/xpluspluscsharpcompared.jpg?w=1024&amp;h=757 1024w, https://gregondax.wordpress.com/wp-content/uploads/2009/06/xpluspluscsharpcompared.jpg 1157w" sizes="(max-width: 700px) 100vw, 700px" /></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/cc967357.aspx">Dynamics AX MSDN Developer Center &#8211; X++ and C# comparisons</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://gregondax.wordpress.com/2009/06/12/xplusplus-and-csharp-compared/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/f6c9a48786510b8bdaf4e54e93d2311327ecf2a5e14e80e00bfccf95a0cfcb44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Greg</media:title>
		</media:content>

		<media:content url="https://gregondax.wordpress.com/wp-content/uploads/2009/06/xpluspluscsharpcompared.jpg" medium="image">
			<media:title type="html">X++ and C# Comparisons</media:title>
		</media:content>
	</item>
		<item>
		<title>Storing passwords using AX</title>
		<link>https://gregondax.wordpress.com/2009/05/21/storing-passwords-using-ax/</link>
					<comments>https://gregondax.wordpress.com/2009/05/21/storing-passwords-using-ax/#comments</comments>
		
		<dc:creator><![CDATA[gregondax]]></dc:creator>
		<pubDate>Thu, 21 May 2009 12:30:18 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[x++ Language]]></category>
		<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Dynamics Ax]]></category>
		<category><![CDATA[Dynamics Ax 2009]]></category>
		<category><![CDATA[Dynamics Ax 4.0]]></category>
		<category><![CDATA[Microsoft Dynamics Ax]]></category>
		<guid isPermaLink="false">http://gregondax.wordpress.com/?p=127</guid>

					<description><![CDATA[If you need to store passwords in AX there are some application objects, classes and attributes that you can use.  This post details the steps you can take to allow entry of a password in a form, which will be stored in the database. 1.  Add the password field to your table. This field should be [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you need to store passwords in AX there are some application objects, classes and attributes that you can use.  This post details the steps you can take to allow entry of a password in a form, which will be stored in the database.</p>
<p><img loading="lazy" data-attachment-id="142" data-permalink="https://gregondax.wordpress.com/2009/05/21/storing-passwords-using-ax/passwordform/" data-orig-file="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordform.png" data-orig-size="276,136" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Password form" data-image-description="" data-image-caption="" data-medium-file="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordform.png?w=276" data-large-file="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordform.png?w=276" class="aligncenter size-full wp-image-142" title="Password form" src="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordform.png?w=700" alt="Password form"   srcset="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordform.png 276w, https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordform.png?w=150&amp;h=74 150w" sizes="(max-width: 276px) 100vw, 276px" /></p>
<p>1.  Add the password field to your table. This field should be of type &#8216;CryptoBlob&#8217; which is a container that contains binary data:</p>
<p><img loading="lazy" data-attachment-id="135" data-permalink="https://gregondax.wordpress.com/2009/05/21/storing-passwords-using-ax/passwordtablefield-2-2/" data-orig-file="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordtablefield2.png" data-orig-size="488,401" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Password table field" data-image-description="" data-image-caption="" data-medium-file="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordtablefield2.png?w=300" data-large-file="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordtablefield2.png?w=488" class="aligncenter size-full wp-image-135" title="Password table field" src="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordtablefield2.png?w=700" alt="Password table field"   srcset="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordtablefield2.png 488w, https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordtablefield2.png?w=150&amp;h=123 150w, https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordtablefield2.png?w=300&amp;h=247 300w" sizes="(max-width: 488px) 100vw, 488px" /></p>
<p>2. Add an edit method for the password to your table:</p>
<pre class="brush: java; title: ; notranslate">
//BP Deviation Documented
edit Password editPassword(boolean _set = false, Password _pwd = &#039;&#039;)
{
    CryptoBlob cryptoBlob = connull();
    ;

    if (_set)
    {
        this.Password = WinapiServer::cryptProtectData(str2cryptoblob(_pwd));
    }

    return (this.Password == connull()) ? &#039;&#039; : &#039;xxxxxxxx&#039;;
}
</pre>
<p>3. Drag and drop the edit method to your form and ensure that the attribute &#8216;PasswordStyle&#8217; is set to &#8216;Yes&#8217;:</p>
<p><img loading="lazy" data-attachment-id="133" data-permalink="https://gregondax.wordpress.com/2009/05/21/storing-passwords-using-ax/passwordformctrl-2/" data-orig-file="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordformctrl1.png" data-orig-size="595,276" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Password form control" data-image-description="" data-image-caption="" data-medium-file="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordformctrl1.png?w=300" data-large-file="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordformctrl1.png?w=595" class="aligncenter size-full wp-image-133" title="Password form control" src="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordformctrl1.png?w=700" alt="Password form control"   srcset="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordformctrl1.png 595w, https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordformctrl1.png?w=150&amp;h=70 150w, https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordformctrl1.png?w=300&amp;h=139 300w" sizes="(max-width: 595px) 100vw, 595px" /></p>
<p>4. To retrieve the password you will need a method similar to the following:</p>
<pre class="brush: java; title: ; notranslate">
static Password getPassword(UserId _userId)
{
    CryptoBlob cryptoBlob = TutorialPasswordTable::find(_userId).Password;
    ;

    return (cryptoBlob == connull()) ? &#039;&#039; :
                cryptoblob2str(WinapiServer::cryptUnProtectData(cryptoBlob));
}
</pre>
<p> <br />
<strong><span style="color:#ff0000;">Disclaimer / Notice / Yada Yada</span> </strong><br />
The safest way to handle passwords is not to store them in the database. The steps described in this post are better than storing the password in the database as plain text, but far from bulletproof. Please ensure that AX security is fully considered if using this method (Table level security, access to code / development etc)</p>
<p>You can download the tutorial as an xpo <a href="http://www.axaptapedia.com/images/d/dd/SharedProject_Tutorial_Password.xpo">here from axaptapedia</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://gregondax.wordpress.com/2009/05/21/storing-passwords-using-ax/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/f6c9a48786510b8bdaf4e54e93d2311327ecf2a5e14e80e00bfccf95a0cfcb44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Greg</media:title>
		</media:content>

		<media:content url="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordform.png" medium="image">
			<media:title type="html">Password form</media:title>
		</media:content>

		<media:content url="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordtablefield2.png" medium="image">
			<media:title type="html">Password table field</media:title>
		</media:content>

		<media:content url="https://gregondax.wordpress.com/wp-content/uploads/2009/05/passwordformctrl1.png" medium="image">
			<media:title type="html">Password form control</media:title>
		</media:content>
	</item>
		<item>
		<title>Table field groups and reusability</title>
		<link>https://gregondax.wordpress.com/2009/05/05/table-field-groups-and-reusability/</link>
					<comments>https://gregondax.wordpress.com/2009/05/05/table-field-groups-and-reusability/#comments</comments>
		
		<dc:creator><![CDATA[gregondax]]></dc:creator>
		<pubDate>Tue, 05 May 2009 13:17:08 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[x++ Language]]></category>
		<category><![CDATA[Axapta]]></category>
		<category><![CDATA[Dynamics Ax]]></category>
		<category><![CDATA[Microsoft Dynamics Ax]]></category>
		<guid isPermaLink="false">http://gregondax.wordpress.com/?p=24</guid>

					<description><![CDATA[Field groups on tables are a great way of arranging groups of related fields to be displayed. The number one reason being that you set these at table level and not form level, so that you can keep this logic separate from the user interface. When field groups are modified Ax will automatically update all reports and [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Field groups on tables are a great way of arranging groups of related fields to be displayed.</p>
<p>The number one reason being that you set these at table level and not form level, so that you can keep this logic separate from the user interface.</p>
<p>When field groups are modified Ax will automatically update all reports and forms that reference them &#8211; <strong>which is really cool!</strong></p>
<p>Another thing that not a lot of people know is that <strong>you can include display and edit methods in your field groups:</strong></p>
<div data-shortcode="caption" id="attachment_116" style="width: 263px" class="wp-caption alignnone"><img aria-describedby="caption-attachment-116" loading="lazy" data-attachment-id="116" data-permalink="https://gregondax.wordpress.com/2009/05/05/table-field-groups-and-reusability/fieldgroupexample/" data-orig-file="https://gregondax.wordpress.com/wp-content/uploads/2009/05/fieldgroupexample.png" data-orig-size="253,273" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="fieldgroupexample" data-image-description="&lt;p&gt;Example of inclusion of display and edit methods in a table field group.&lt;/p&gt;
" data-image-caption="&lt;p&gt;Field group example&lt;/p&gt;
" data-medium-file="https://gregondax.wordpress.com/wp-content/uploads/2009/05/fieldgroupexample.png?w=253" data-large-file="https://gregondax.wordpress.com/wp-content/uploads/2009/05/fieldgroupexample.png?w=253" class="size-full wp-image-116" title="fieldgroupexample" src="https://gregondax.wordpress.com/wp-content/uploads/2009/05/fieldgroupexample.png?w=700" alt="Field group example"   srcset="https://gregondax.wordpress.com/wp-content/uploads/2009/05/fieldgroupexample.png 253w, https://gregondax.wordpress.com/wp-content/uploads/2009/05/fieldgroupexample.png?w=139&amp;h=150 139w" sizes="(max-width: 253px) 100vw, 253px" /><p id="caption-attachment-116" class="wp-caption-text">Field group example</p></div>
<p>Related links (from msdn):</p>
<p><a title="How to: Create a field group" href="http://msdn.microsoft.com/en-us/library/aa611907(AX.10).aspx">How to: Create a field group</a></p>
<p><a title="Always use field groups in tables" href="http://msdn.microsoft.com/en-us/library/aa641676(AX.10).aspx">Always use field groups in tables</a></p>
<p><a title="Best practices for field groups" href="http://msdn.microsoft.com/en-us/library/aa620479(AX.10).aspx">Best practices for field groups</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://gregondax.wordpress.com/2009/05/05/table-field-groups-and-reusability/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/f6c9a48786510b8bdaf4e54e93d2311327ecf2a5e14e80e00bfccf95a0cfcb44?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Greg</media:title>
		</media:content>

		<media:content url="https://gregondax.wordpress.com/wp-content/uploads/2009/05/fieldgroupexample.png" medium="image">
			<media:title type="html">fieldgroupexample</media:title>
		</media:content>
	</item>
	</channel>
</rss>
