<?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</title>
	<atom:link href="http://www.artofcreation.be/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.artofcreation.be</link>
	<description>The everyday life of a Dynamics AX developer</description>
	<lastBuildDate>Wed, 24 Feb 2010 21:57:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rename an AX company on SQL</title>
		<link>http://www.artofcreation.be/2010/02/24/rename-an-ax-company-on-sql/</link>
		<comments>http://www.artofcreation.be/2010/02/24/rename-an-ax-company-on-sql/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 21:57:25 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=530</guid>
		<description><![CDATA[A while ago, I talked about deleting an AX company on SQL, but of course, you can also use the sp_MSforeachtable stored procedure to rename a company (= change the DataAreaId of a company).
In the next example, I rename CEE to CEA:
exec sp_MSforeachtable 'update ? set DataAreaID = &#34;CEA&#34; where ?.DataAreaID = &#34;CEE&#34;'

UPDATE DataArea SET [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago, I talked about <a href="http://www.artofcreation.be/2010/02/03/delete-an-ax-company-on-sql/">deleting an AX company on SQL</a>, but of course, you can also use the sp_MSforeachtable stored procedure to rename a company (= change the DataAreaId of a company).</p>
<p>In the next example, I rename CEE to CEA:</p>
<div class="codecolorer-container sql default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">exec sp_MSforeachtable <span style="color: #ff0000;">'update ? set DataAreaID = &quot;CEA&quot; where ?.DataAreaID = &quot;CEE&quot;'</span><br />
<br />
<span style="color: #993333; font-weight: bold;">UPDATE</span> DataArea <span style="color: #993333; font-weight: bold;">SET</span> ID <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'CEA'</span> <span style="color: #993333; font-weight: bold;">WHERE</span> DataArea<span style="color: #66cc66;">.</span>ID <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'CEE'</span><br />
<span style="color: #993333; font-weight: bold;">UPDATE</span> CompanyDomainList <span style="color: #993333; font-weight: bold;">SET</span> CompanyID <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'CEA'</span> <span style="color: #993333; font-weight: bold;">WHERE</span> CompanyID <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'CEE'</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2010/02/24/rename-an-ax-company-on-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>X++ and Notepad++</title>
		<link>http://www.artofcreation.be/2010/02/18/x-and-notepad/</link>
		<comments>http://www.artofcreation.be/2010/02/18/x-and-notepad/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 17:13:19 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Noepad++]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[X++]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=494</guid>
		<description><![CDATA[I notice that a lot of people are looking for a way to syntax color their xpo&#8217;s when viewing them in Notepad++. 
There is an article on Axaptapedia that covers this, that includes a sample xml snippet you can use. 
For some reason though, when you google &#8220;x++ notepad++&#8221;, the Axaptapedia page is nowhere to [...]]]></description>
			<content:encoded><![CDATA[<p>I notice that a lot of people are looking for a way to syntax color their xpo&#8217;s when viewing them in <a href="http://notepad-plus.sourceforge.net/uk/site.htm">Notepad++</a>. </p>
<p>There is an <a href="http://www.axaptapedia.com/Notepad">article on Axaptapedia</a> that covers this, that includes a sample xml snippet you can use. </p>
<p>For some reason though, when you google &#8220;x++ notepad++&#8221;, the Axaptapedia page is nowhere to be found. </p>
<p>I&#8217;ve also created a custom language based on the one on wikipedia, that uses colors that resemble the ones in the X++ editor a bit more:</p>
<div class="codecolorer-container xml default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;UserLang</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;XPP_XPO&quot;</span> <span style="color: #000066;">ext</span>=<span style="color: #ff0000;">&quot;xpo&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Settings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Global</span> <span style="color: #000066;">caseIgnored</span>=<span style="color: #ff0000;">&quot;no&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TreatAsSymbol</span> <span style="color: #000066;">comment</span>=<span style="color: #ff0000;">&quot;no&quot;</span> <span style="color: #000066;">commentLine</span>=<span style="color: #ff0000;">&quot;no&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Prefix</span> <span style="color: #000066;">words1</span>=<span style="color: #ff0000;">&quot;no&quot;</span> <span style="color: #000066;">words2</span>=<span style="color: #ff0000;">&quot;no&quot;</span> <span style="color: #000066;">words3</span>=<span style="color: #ff0000;">&quot;no&quot;</span> <span style="color: #000066;">words4</span>=<span style="color: #ff0000;">&quot;no&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Settings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;KeywordLists<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Keywords</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Delimiters&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #ddbb00;">&amp;quot;&amp;apos;</span>0<span style="color: #ddbb00;">&amp;quot;&amp;apos;</span>0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Keywords<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Keywords</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Folder+&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>SOURCE { CLASS METHODS PROPERTIES CONTROL CONTAINER ARRAY INDEX FORM OBJECTBANK DATASOURCE OBJECTPOOL FIELDLIST JOINS DESIGN TYPEELEMENTS TYPEREFERENCES USERTYPE FIELDS GROUPS GROUPFIELDS GROUP DATAFIELD INDICES INDEXFIELDS REFERENCES REFERENCE FIELDREFERENCES DELETEACTIONS BEGINNODE MENUITEM MENU<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Keywords<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Keywords</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Folder-&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>ENDSOURCE } ENDMETHODS ENDCLASS ENDPROPERTIES ENDCONTROL ENDCONTAINER ENDARRAY ENDFORM ENDOBJECTBANK ENDDATASOURCE ENDOBJECTPOOL ENDFIELDLIST ENDJOINS ENDDESIGN ENDTYPEELEMENTS ENDTYPEREFERENCES ENDUSERTYPE ENDFIELDS ENDGROUPS ENDGROUPFIELDS ENDGROUP ENDINDEXFIELDS ENDINDICES ENDFIELDREFERENCES ENDREFERENCE ENDREFERENCES ENDDELETEACTIONS ENDTABLE ENDNODE ENDPROJECT ENDDATAFIELD ENDMENUITEM ENDMENU<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Keywords<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Keywords</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Operators&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #ddbb00;">&amp;apos;</span> ! <span style="color: #ddbb00;">&amp;quot;</span> ?<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Keywords<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Keywords</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Comment&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>1/* 2*/ 0//<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Keywords<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Keywords</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Words1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Formatversion: Configuration: language directory company user client fetchahead opencursors database dsn sqluser hint sqlbuffer log hassqlpwd sqlpwd sqlparm retry dbserversqltrace haswarnings warnings share bindir startupmsg servermask localappl localappldoc locallabel localsysdoc applshare applexclusive doclanguage startupcmd logdir hascompwd compwd hasserveridletimeout serveridletimeout connectionidletimeout querytimelimit extracmdline port createdsn createdsn_tcpipport aos allowunauth exposeserverprers useserverprers sqlformliterals sqlcomplexliterals sqloraclefirstrowsfix ignoredatasourceindex aosencryption xppdebug dbcli ociconnectservice ociservice ocihost ocidbid ocitcpipport ociuser hasocipwd ocipwd preloadthresholdmsec preloadthresholdrecords dbunicodeenabled newconnectionretrydelayms newconnectionretrycount cachesynctime _clientmode _clientadname application broadcast internet aol aolcode sql native dbserver sqltrace exposeserverprinters useserverprinters ***Element FRMVERSION str container int select firstonly where while for Filename if return void public super element Return Yes No Delayed<span style="color: #ddbb00;">&amp;#x0D;&amp;#x0A;</span> First Auto Default Normal Watch Vertical NoAccess Main Column width None Outside Opaque Button face View Grid Window background Highlight text Left Right only Text info run Version Else error Args Raised height Horizontal flush right boolean Common QueryRun FormTreeItem class Set FormTreeControl map anytype Dialog SysDictField this New new Query QueryBuildRange else QueryBuildDataSource Array mapiterator ttsbegin ttscommit FileName SaxReader SaxErrorHandler SaxAttributes TextBuffer protected catch try Called from classDeclaration Arrow USERTYPEVERSION TABLEVERSION FIELD Integer Absolute AutoReport AutoLookup REFERENCETYPE NORMAL static Miscellaneous Delete Not specified String Memo Cascade PROJECTVERSION SHARED JOBVERSION NoYes private null count Map DictTable break ttsBegin ttsCommit Error Exception true sum server DictField Counter throw join abstract extends endif index continue false switch case Version Restricted InnerJoin Active Standard Display VERSION MNUVERSION<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Keywords<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Keywords</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Words2&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Text Int Name Table Index Company CounterField AllowCheck AllowEdit AllowCreate AllowDelete StartPosition AutoSearch AutoNotify AutoQuery OnlyFetchActive JoinSource LinkType DelayActive InsertAtEnd InsertIfEmpty Left Top Width Height Visible Caption TitleDatasource Frame WindowResize WindowType SaveSize SaveSize HideToolbar SetCompany ColorScheme CssClass ShowWebHelp BackgroundColor ImageName ImageResource Imagemode Mode SubmitMethod SupportReload LocalWebMenu AllowDocking Font FontSize Italic Underline Bold CharacterSet LabelFont LabelFontSize LabelItalic LabelUnderline LabelBold LabelCharacterSet DataSource TopMargin BottomMargin LeftMargin RightMargin ArrangeWhen ArrangeMethod Columns Columnspace ArrangeGuide HideIfEmpty AlignChildren AlignChild AllowUserSetup NeededAccessLevel AutoDeclaration VerticalSpacing Enabled Skip AlignControl HelpText ConfigurationKey SecurityKey DragDrop FrameType FramePosition BackStyle FrameOptionButton OptionValue DataGroup AutoDataGroup MultiSelect VisibleCols VisibleRows ShowColLabels ShowRowLabels HighlightActive ActiveBackColor ActiveForeColor GridLines LookupButton ReplaceOnLookup LimitText DisplayLength DisplayHeight Border Value Alignment SignDisplay RotateSign ShowZero DisplaceNegative AllowNegative ForegroundColor LabelForegroundColor ShowLabel Label LabelWidth LabelHeight LabelPosition LabelAlignment DataField Mandatory ArrayIndex SearchMode PasswordStyle ChangeCase MultiLine ExtendedDataType DataMethod ButtonDisplay NormalImage NormalResource DisabledImage DisabledResource ShowShortCut DefaultButton SaveRecord Tabs Tab TabAppearance ShowTabs TabPlacement TabLayout SelectControl TabAutoChange Extends RunOnFormHelp ArrayLength FormHelp ButtonImage StringSize Adjustment GroupPrompt SaveContents AliasFor AllowEditOnCreate FieldUpdate Type OldName AllowDuplicates Validate Field RelatedField TitleField1 TitleField2 Temporary TableContents Systemtable MaxAccessMode CreateRecIdIndex SaveDataPerCompany TableGroup PrimaryIndex ClusterIndex ModifiedDate ModifiedTime ModifiedBy ModifiedTransactionId CreatedDate CreatedTime CreatedBy CreatedTransactionId DeleteAction FormRef CacheLookup FILETYPE UTILTYPE UTILOBJECTID NODETYPE NAME EnumType Style RunOn AllowAdd Selection HideFirstEntry ComboType AppendNew SizeWidth SizeHeight MenuItemType MenuItemName DateValue DateFormat DateSeparator DateYear DateMonth DateDay RealValue ThousandSeparator DecimalSeparator NoOfDecimals AutoInsSeparator FormatMST Class Object Parameters EnumTypeParameter EnumParameter Web WebAccess WebSecureTransaction WebPage CountryConfigurationkey WebConfigurationkey WebTarget ProjectGroupType GroupMask PreventEditProperties<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Keywords<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Keywords</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Words3&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>FRM GRID INTEDIT STRINGEDIT BUTTON TAB TABPAGE CLS CLSVERSION || <span style="color: #ddbb00;">&amp;amp;&amp;amp;</span> UTI INT UTS STRING DBT TABLE PRN PROJECT END \ JOB ENUM COMBOBOX CHECKBOX STATICTEXT BUTTONGROUP MENUITEMBUTTON MENUBUTTON WINDOW DATEEDIT REALEDIT SEPARATOR FTM MNU UTE<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Keywords<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Keywords</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Words4&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>@<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Keywords<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/KeywordLists<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Styles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;WordsStyle</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;DEFAULT&quot;</span> <span style="color: #000066;">styleID</span>=<span style="color: #ff0000;">&quot;11&quot;</span> <span style="color: #000066;">fgColor</span>=<span style="color: #ff0000;">&quot;000000&quot;</span> <span style="color: #000066;">bgColor</span>=<span style="color: #ff0000;">&quot;FFFFFF&quot;</span> <span style="color: #000066;">fontName</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">fontStyle</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;WordsStyle</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;FOLDEROPEN&quot;</span> <span style="color: #000066;">styleID</span>=<span style="color: #ff0000;">&quot;12&quot;</span> <span style="color: #000066;">fgColor</span>=<span style="color: #ff0000;">&quot;FF8040&quot;</span> <span style="color: #000066;">bgColor</span>=<span style="color: #ff0000;">&quot;FFFFFF&quot;</span> <span style="color: #000066;">fontName</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">fontStyle</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;WordsStyle</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;FOLDERCLOSE&quot;</span> <span style="color: #000066;">styleID</span>=<span style="color: #ff0000;">&quot;13&quot;</span> <span style="color: #000066;">fgColor</span>=<span style="color: #ff0000;">&quot;FF8040&quot;</span> <span style="color: #000066;">bgColor</span>=<span style="color: #ff0000;">&quot;FFFFFF&quot;</span> <span style="color: #000066;">fontName</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">fontStyle</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;WordsStyle</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;KEYWORD1&quot;</span> <span style="color: #000066;">styleID</span>=<span style="color: #ff0000;">&quot;5&quot;</span> <span style="color: #000066;">fgColor</span>=<span style="color: #ff0000;">&quot;0000FF&quot;</span> <span style="color: #000066;">bgColor</span>=<span style="color: #ff0000;">&quot;FFFFFF&quot;</span> <span style="color: #000066;">fontName</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">fontStyle</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;WordsStyle</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;KEYWORD2&quot;</span> <span style="color: #000066;">styleID</span>=<span style="color: #ff0000;">&quot;6&quot;</span> <span style="color: #000066;">fgColor</span>=<span style="color: #ff0000;">&quot;007F00&quot;</span> <span style="color: #000066;">bgColor</span>=<span style="color: #ff0000;">&quot;FFFFFF&quot;</span> <span style="color: #000066;">fontName</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">fontStyle</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;WordsStyle</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;KEYWORD3&quot;</span> <span style="color: #000066;">styleID</span>=<span style="color: #ff0000;">&quot;7&quot;</span> <span style="color: #000066;">fgColor</span>=<span style="color: #ff0000;">&quot;FF0000&quot;</span> <span style="color: #000066;">bgColor</span>=<span style="color: #ff0000;">&quot;FFFFFF&quot;</span> <span style="color: #000066;">fontName</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">fontStyle</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;WordsStyle</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;KEYWORD4&quot;</span> <span style="color: #000066;">styleID</span>=<span style="color: #ff0000;">&quot;8&quot;</span> <span style="color: #000066;">fgColor</span>=<span style="color: #ff0000;">&quot;FF0000&quot;</span> <span style="color: #000066;">bgColor</span>=<span style="color: #ff0000;">&quot;FFFFFF&quot;</span> <span style="color: #000066;">fontName</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">fontStyle</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;WordsStyle</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;COMMENT&quot;</span> <span style="color: #000066;">styleID</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">fgColor</span>=<span style="color: #ff0000;">&quot;007F00&quot;</span> <span style="color: #000066;">bgColor</span>=<span style="color: #ff0000;">&quot;FFFFFF&quot;</span> <span style="color: #000066;">fontName</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">fontStyle</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;WordsStyle</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;COMMENT LINE&quot;</span> <span style="color: #000066;">styleID</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">fgColor</span>=<span style="color: #ff0000;">&quot;007F00&quot;</span> <span style="color: #000066;">bgColor</span>=<span style="color: #ff0000;">&quot;FFFFFF&quot;</span> <span style="color: #000066;">fontName</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">fontStyle</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;WordsStyle</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;NUMBER&quot;</span> <span style="color: #000066;">styleID</span>=<span style="color: #ff0000;">&quot;4&quot;</span> <span style="color: #000066;">fgColor</span>=<span style="color: #ff0000;">&quot;000000&quot;</span> <span style="color: #000066;">bgColor</span>=<span style="color: #ff0000;">&quot;FFFFFF&quot;</span> <span style="color: #000066;">fontName</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">fontStyle</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">fontSize</span>=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;WordsStyle</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;OPERATOR&quot;</span> <span style="color: #000066;">styleID</span>=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000066;">fgColor</span>=<span style="color: #ff0000;">&quot;FF0000&quot;</span> <span style="color: #000066;">bgColor</span>=<span style="color: #ff0000;">&quot;FFFFFF&quot;</span> <span style="color: #000066;">fontName</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">fontStyle</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;WordsStyle</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;DELIMINER1&quot;</span> <span style="color: #000066;">styleID</span>=<span style="color: #ff0000;">&quot;14&quot;</span> <span style="color: #000066;">fgColor</span>=<span style="color: #ff0000;">&quot;FF0000&quot;</span> <span style="color: #000066;">bgColor</span>=<span style="color: #ff0000;">&quot;FFFFFF&quot;</span> <span style="color: #000066;">fontName</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">fontStyle</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;WordsStyle</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;DELIMINER2&quot;</span> <span style="color: #000066;">styleID</span>=<span style="color: #ff0000;">&quot;15&quot;</span> <span style="color: #000066;">fgColor</span>=<span style="color: #ff0000;">&quot;FF0000&quot;</span> <span style="color: #000066;">bgColor</span>=<span style="color: #ff0000;">&quot;FFFFFF&quot;</span> <span style="color: #000066;">fontName</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">fontStyle</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;WordsStyle</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;DELIMINER3&quot;</span> <span style="color: #000066;">styleID</span>=<span style="color: #ff0000;">&quot;16&quot;</span> <span style="color: #000066;">fgColor</span>=<span style="color: #ff0000;">&quot;000000&quot;</span> <span style="color: #000066;">bgColor</span>=<span style="color: #ff0000;">&quot;FFFFFF&quot;</span> <span style="color: #000066;">fontName</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">fontStyle</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Styles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/UserLang<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>This is how it looks in Notepad++:<br />
<div id="attachment_503" class="wp-caption aligncenter" style="width: 508px"><a href="http://www.artofcreation.be/wp-content/uploads/syntaxcoloring1.png"><img src="http://www.artofcreation.be/wp-content/uploads/syntaxcoloring1.png" alt="Syntax coloring X++ in Notepad++" title="Syntax coloring X++ in Notepad++" width="498" height="544" class="size-full wp-image-503" /></a><p class="wp-caption-text">Syntax coloring X++ in Notepad++</p></div></p>
<p>Links:<br />
<a href="http://notepad-plus.sourceforge.net/uk/site.htm">Notepad++ homepage</a><br />
<a href="http://www.axaptapedia.com/Notepad">Notepad++ on Axaptapedia</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2010/02/18/x-and-notepad/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Protected new and construct &#8211; Part 2</title>
		<link>http://www.artofcreation.be/2010/02/18/protected-new-and-construct-part-2/</link>
		<comments>http://www.artofcreation.be/2010/02/18/protected-new-and-construct-part-2/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 17:06:49 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[Inheritance]]></category>
		<category><![CDATA[Patterns]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=479</guid>
		<description><![CDATA[In part 1, we talked about the use of a protected new method and a static constructor, and how it helps improve your classes.
Now let&#8217;s see how it helps you maintain you code better when extending classes.
In the previous example, we printed some general information about a record to the screen.
Let&#8217;s say that, in case [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.artofcreation.be/2010/02/15/protected-new-and-construct-part-1/">part 1</a>, we talked about the use of a protected new method and a static constructor, and how it helps improve your classes.</p>
<p>Now let&#8217;s see how it helps you maintain you code better when extending classes.</p>
<p>In the previous example, we printed some general information about a record to the screen.<br />
Let&#8217;s say that, in case of CustTable we want to have information printed to to screen that is specific to this record, like the AccountNum or Name field. </p>
<p>We will need to create a new class that extends <a href="http://www.artofcreation.be/2010/02/15/protected-new-and-construct-part-1/">the class we created earlier</a>. </p>
<p><strong>1. ClassDeclaration KLFShowRecordInfo_CustTable</strong><br />
In the ClassDeclaration, we include the keyword &#8216;extends&#8217; to specify that our new class extends the functionality of the class KLFShowRecordInfo.</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"><span style="color: #0000ff;">class</span> KLFShowRecordInfo_CustTable <span style="color: #0000ff;">extends</span> KLFShowRecordInfo<br />
<span style="color: #000000;">&#123;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p><strong>2. Construct method KLFShowRecordInfo_CustTable</strong><br />
We will also add a construct method to this class. This will create an instance of this class for us, and set the parm method.<br />
Because we extend a class that contains this parm method, we don&#8217;t need to add it to this class again.</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"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> KLFShowRecordInfo_CustTable construct<span style="color: #000000;">&#40;</span>Common _record<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; KLFShowRecordInfo_CustTable kLFShowRecordInfo_CustTable;<br />
&nbsp; &nbsp; ;<br />
<br />
&nbsp; &nbsp; kLFShowRecordInfo_CustTable <span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> KLFShowRecordInfo_CustTable<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; kLFShowRecordInfo_CustTable.<span style="color: #000000;">parmRecord</span><span style="color: #000000;">&#40;</span>_record<span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">return</span> kLFShowRecordInfo_CustTable;<br />
<span style="color: #000000;">&#125;</span></div></div>
<p><strong>3. Run method KLFShowRecordInfo_CustTable</strong><br />
In the run method, we print data from the CustTable record to screen.</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"><span style="color: #0000ff;">void</span> run<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; CustTable custTable;<br />
&nbsp; &nbsp; ;<br />
<br />
&nbsp; &nbsp; custTable <span style="color: #00007f;">=</span> this.<span style="color: #000000;">parmRecord</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; info<span style="color: #000000;">&#40;</span>custTable.<span style="color: #000000;">AccountNum</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; info<span style="color: #000000;">&#40;</span>custTable.<span style="color: #000000;">Name</span><span style="color: #000000;">&#41;</span>;<br />
<span style="color: #000000;">&#125;</span></div></div>
<p>You could call the super() method if you want the general information to be printed as well. </p>
<p><strong>4. Construct method KLFShowRecordInfo</strong><br />
The only thing we need to change to the existing class is the construct method.<br />
Modify it 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"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> KLFShowRecordInfo construct<span style="color: #000000;">&#40;</span>Common _record<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; KLFShowRecordInfo kLFShowRecordInfo;<br />
&nbsp; &nbsp; ;<br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">switch</span> <span style="color: #000000;">&#40;</span>_record.<span style="color: #000000;">TableId</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">case</span> <span style="color: #0000ff;">tablenum</span><span style="color: #000000;">&#40;</span>CustTable<span style="color: #000000;">&#41;</span><span style="color: #00007f;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; kLFShowRecordInfo <span style="color: #00007f;">=</span> KLFShowRecordInfo_CustTable<span style="color: #00007f;">::</span><span style="color: #000000;">construct</span><span style="color: #000000;">&#40;</span>_record<span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">break</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">default</span> <span style="color: #00007f;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; kLFShowRecordInfo <span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> KLFShowRecordInfo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; kLFShowRecordInfo.<span style="color: #000000;">parmRecord</span><span style="color: #000000;">&#40;</span>_record<span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">break</span>;<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">return</span> kLFShowRecordInfo;<br />
<span style="color: #000000;">&#125;</span></div></div>
<p>The switch will check which table is being processed, and will create an instance of KLFShowRecordInfo_CustTable in case of CustTable. For all other tables, it will construct an instance of KLFShowRecordInfo.</p>
<p><strong>5. TestJob</strong><br />
Let&#8217;s test it:</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"><span style="color: #0000ff;">static</span> <span style="color: #0000ff;">void</span> KLF_TestRecordInfo<span style="color: #000000;">&#40;</span>Args _args<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; CustTable custTable;<br />
&nbsp; &nbsp; VendTable vendTable;<br />
&nbsp; &nbsp; ;<br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">select</span> <span style="color: #0000ff;">firstonly</span> custTable;<br />
&nbsp; &nbsp; <span style="color: #0000ff;">select</span> <span style="color: #0000ff;">firstonly</span> vendTable;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// custTable:</span><br />
&nbsp; &nbsp; KLFShowRecordInfo<span style="color: #00007f;">::</span><span style="color: #000000;">construct</span><span style="color: #000000;">&#40;</span>custTable<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; info<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;----&quot;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #007f00;">// vendTable:</span><br />
&nbsp; &nbsp; KLFShowRecordInfo<span style="color: #00007f;">::</span><span style="color: #000000;">construct</span><span style="color: #000000;">&#40;</span>vendTable<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Output:</p>
<blockquote><p>00000001<br />
IKEA<br />
&#8212;-<br />
VendTable</p></blockquote>
<p><strong>Conclusion</strong><br />
This concludes my articles about the protected new and construct methods. I realise that the examples are very simple, but the principle will remain the same, even in more complex scenarios. </p>
<p>To sum up:<br />
My basic recommendations when creating classes are:<br />
- Use a protected new method<br />
- Use a construct method<br />
- Use parm methods<br />
- Create a run method that contains your business logic<br />
- Instead of modifying existing classes, create new ones that extend existing</p>
<p>If you disagree, be sure to leave a comment <img src='http://www.artofcreation.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . </p>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2010/02/18/protected-new-and-construct-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Run AIF inbound and outbound manually</title>
		<link>http://www.artofcreation.be/2010/02/17/run-aif-inbound-and-outbound-manually/</link>
		<comments>http://www.artofcreation.be/2010/02/17/run-aif-inbound-and-outbound-manually/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 17:51:53 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[AIF]]></category>
		<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[Batch]]></category>
		<category><![CDATA[Job]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=485</guid>
		<description><![CDATA[To have AIF import and export message, you have to have 4 batch tasks running (all about it here on TechNet). However, when developing, it is inefficient (and also tad tedious) to wait for those batches.
Here are two jobs to run inbound and outbound messages manually, so you don&#8217;t have to wait for the batches [...]]]></description>
			<content:encoded><![CDATA[<p>To have AIF import and export message, you have to have 4 batch tasks running (<a href="http://technet.microsoft.com/en-us/library/aa570105.aspx">all about it here on TechNet</a>). However, when developing, it is inefficient (and also tad tedious) to wait for those batches.</p>
<p>Here are two jobs to run inbound and outbound messages manually, so you don&#8217;t have to wait for the batches to pick them up.</p>
<p>Inbound:</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"><span style="color: #0000ff;">static</span> <span style="color: #0000ff;">void</span> KlForrunAIFInbound<span style="color: #000000;">&#40;</span>Args _args<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; ;<br />
&nbsp; &nbsp; <span style="color: #007f00;">// read the messages</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">new</span> AifGateWayReceiveService<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// process the messages in queue</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">new</span> AifInboundProcessingService<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; info<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;done&quot;</span><span style="color: #000000;">&#41;</span>;<br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Outbound:</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"><span style="color: #0000ff;">static</span> <span style="color: #0000ff;">void</span> KlForrunAIFOutbound<span style="color: #000000;">&#40;</span>Args _args<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; ;<br />
&nbsp; &nbsp; <span style="color: #007f00;">// process messages in queue</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">new</span> AifOutboundProcessingService<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// send messages</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">new</span> AifGateWaySendService<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; info<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;done&quot;</span><span style="color: #000000;">&#41;</span>;<br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Ofcourse, you can put this code in classes, or combine them so they are executed together. Because inbound messages can trigger outbound messages, it&#8217;s better to process the inbound messages before the outbound messages.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2010/02/17/run-aif-inbound-and-outbound-manually/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protected new and construct &#8211; Part 1</title>
		<link>http://www.artofcreation.be/2010/02/15/protected-new-and-construct-part-1/</link>
		<comments>http://www.artofcreation.be/2010/02/15/protected-new-and-construct-part-1/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 09:16:31 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[Inheritance]]></category>
		<category><![CDATA[Patterns]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=453</guid>
		<description><![CDATA[In this post I want to show you the use of the new() and construct() method when instantiating classes using a simple example class. This is a design that is used a lot an AX. 
It is best practice to set the new method as protected (MSDN), and it is also best practice to have [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I want to show you the use of the new() and construct() method when instantiating classes using a simple example class. This is a design that is used a lot an AX. </p>
<p>It is best practice to set the new method as protected (<a href="http://msdn.microsoft.com/en-us/library/aa594035.aspx">MSDN</a>), and it is also best practice to have a construct method in your class (<a href="http://msdn.microsoft.com/en-us/library/aa637432.aspx">MSDN</a>). So let&#8217;s see how we should implement these best practices.</p>
<p>Like a good recipe, a good class has a few important ingredients:<br />
- Parm methods for variables<br />
- A protected new method<br />
- A static contructor<br />
- A run method</p>
<p><strong>1. ClassDeclaration</strong></p>
<p>As an example, we will create a new class: KLFShowRecordInfo<br />
The function of the class will be to display some information about a record.</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"><span style="color: #0000ff;">class</span> KLFShowRecordInfo<br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; Common record;<br />
<span style="color: #000000;">&#125;</span></div></div>
<p>This class has one variable, a record. The type is Common so we can store any record in this variable.</p>
<p><strong>2. Parm method</strong></p>
<p>First thing is to create a parm-method for this variable (<a href="http://www.artofcreation.be/2009/08/27/editorscripts-create-parm-method-from-class-declaration/">created using parmFromCD editorscript</a>):</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"><span style="color: #0000ff;">public</span> Common parmRecord<span style="color: #000000;">&#40;</span>Common _record <span style="color: #00007f;">=</span> record<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
;<br />
&nbsp; &nbsp; record <span style="color: #00007f;">=</span> _record;<br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">return</span> record;<br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Your code will be much cleaner and easier to debug when you use parameter methods.</p>
<p><strong>3. New Method</strong></p>
<p>Next, we will override the new method and make it protected:</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"><span style="color: #0000ff;">protected</span> <span style="color: #0000ff;">void</span> <span style="color: #0000ff;">new</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Methods that are declared as protected can only be called from methods in the class and in subclasses of the class where the protected method is declared. When we want to create an instance of this class from an other class, we&#8217;ll have to call the construct method.<br />
When calling the new() method in any other class, we would get the following compiler error:</p>
<blockquote><p>The method is declared protected and may only be called from methods in classes derived from KLFShowRecordInfo.</p></blockquote>
<p><strong>4. Construct method</strong></p>
<p>When using the editorscript to create a construct() method (Right click &#8211; Scripts &#8211; template &#8211; method &#8211; construct), it will look 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"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> KLFShowRecordInfo construct<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">new</span> KLFShowRecordInfo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
<span style="color: #000000;">&#125;</span></div></div>
<p>However, I always rewrite it like like this because it is easier to extend afterwards:</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"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> KLFShowRecordInfo construct<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; KLFShowRecordInfo kLFShowRecordInfo;<br />
&nbsp; &nbsp; ;<br />
<br />
&nbsp; &nbsp; kLFShowRecordInfo <span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> KLFShowRecordInfo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">return</span> kLFShowRecordInfo;<br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Now we&#8217;ll have to modify the construct method to receive a parameter, and use the parm method to set the variable in our class:</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"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">static</span> KLFShowRecordInfo construct<span style="color: #000000;">&#40;</span>Common _record<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; KLFShowRecordInfo kLFShowRecordInfo;<br />
&nbsp; &nbsp; ;<br />
<br />
&nbsp; &nbsp; kLFShowRecordInfo <span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> KLFShowRecordInfo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; kLFShowRecordInfo.<span style="color: #000000;">parmRecord</span><span style="color: #000000;">&#40;</span>_record<span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">return</span> kLFShowRecordInfo;<br />
<span style="color: #000000;">&#125;</span></div></div>
<p><strong>5. Run method</strong><br />
All we need now is some logic to add to this class. Most of the time, I name the method &#8216;run&#8217;, but you can give it any name you like. The method will display the name of the table of the record you pass to it.</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"><span style="color: #0000ff;">void</span> run<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; ;<br />
&nbsp; &nbsp; info<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">tableid2name</span><span style="color: #000000;">&#40;</span>this.<span style="color: #000000;">parmRecord</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #000000;">TableId</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />
<span style="color: #000000;">&#125;</span></div></div>
<p><strong>6. Test job</strong><br />
Next, a job to test it:</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"><span style="color: #0000ff;">static</span> <span style="color: #0000ff;">void</span> KLF_TestRecordInfo<span style="color: #000000;">&#40;</span>Args _args<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; CustTable custTable;<br />
&nbsp; &nbsp; ;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0000ff;">select</span> <span style="color: #0000ff;">firstonly</span> custTable;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #007f00;">// this will not work because the new method is protected</span><br />
&nbsp; &nbsp; <span style="color: #007f00;">// kLFShowRecordInfo = new KLFShowRecordInfo();</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; KLFShowRecordInfo<span style="color: #00007f;">::</span><span style="color: #000000;">construct</span><span style="color: #000000;">&#40;</span>custTable<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
<span style="color: #000000;">&#125;</span></div></div>
<p>You can see that we only need one line of code to call our class, and we don&#8217;t need a variable, which makes the code cleaner. </p>
<p>Output:</p>
<blockquote><p>CustTable</p></blockquote>
<p><strong>Conclusion</strong><br />
When creating a class, start with declaring the new method as protected. This will force you to use a static construct() method. This in turn will force you to think twice about the structure of your class, and will result in cleaner/better code with a more &#8216;AX-y&#8217; feel.</p>
<p>In part 2 (coming soon), I will demonstrate how this design principle helps you to maintain your code when extending functionality. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2010/02/15/protected-new-and-construct-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft TechDays 2010 Antwerp</title>
		<link>http://www.artofcreation.be/2010/02/05/microsoft-techdays-2010-antwerp/</link>
		<comments>http://www.artofcreation.be/2010/02/05/microsoft-techdays-2010-antwerp/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 13:46:53 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[TechDays]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=447</guid>
		<description><![CDATA[On March 31 and April 1, I will be attending Microsoft TechDays 2010 conference in Antwerp, Belgium. Me and my colleagues will be wearing a T-shirt that says RealDolmen (no doubt followed by a catchy slogan the PR people will come up with). 
With over 80 sessions from international speakers to choose from, it will [...]]]></description>
			<content:encoded><![CDATA[<p>On March 31 and April 1, I will be attending Microsoft TechDays 2010 conference in Antwerp, Belgium. Me and my colleagues will be wearing a T-shirt that says RealDolmen (no doubt followed by a catchy slogan the PR people will come up with). </p>
<p>With over 80 sessions from international speakers to choose from, it will be difficult to pick the most interesting ones. </p>
<p>See you at TechDays.</p>
<p>Link: <a href="http://www.microsoft.com/belux/techdays/2010/default.aspx">Microsoft TechDays 2010</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2010/02/05/microsoft-techdays-2010-antwerp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Str2int and IsInteger</title>
		<link>http://www.artofcreation.be/2010/02/04/str2int-and-isinteger/</link>
		<comments>http://www.artofcreation.be/2010/02/04/str2int-and-isinteger/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 11:16:50 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[Data Types]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=439</guid>
		<description><![CDATA[Here&#8217;s a little &#8216;be-aware&#8217; I&#8217;d like to share.
The function str2int() that converts a string to an integer will return &#8216;0&#8242; if the input string is not an integer, so it is necessary to check if the string is an integer before casting it.
The function that does this is not IsNumeric() like in SQL or VB, [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a little &#8216;be-aware&#8217; I&#8217;d like to share.</p>
<p>The function str2int() that converts a string to an integer <strong>will return &#8216;0&#8242; if the input string is not an integer</strong>, so it is necessary to check if the string is an integer before casting it.</p>
<p>The function that does this is not IsNumeric() like in SQL or VB, but IsInteger().<br />
Alternatively, you can also use str2IntOk(). Both are found in the global class.</p>
<p>I&#8217;ve seen people searching for this method (including me), so I just thought I&#8217;d share.</p>
<p>Here&#8217;s some sample code:</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"><span style="color: #0000ff;">static</span> <span style="color: #0000ff;">void</span> klforStr2intAndIsIntegerTest<span style="color: #000000;">&#40;</span>Args _args<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">str</span> input_notint &nbsp; &nbsp;<span style="color: #00007f;">=</span> <span style="color: #ff0000;">&quot;abc123&quot;</span>;<br />
&nbsp; &nbsp; <span style="color: #0000ff;">str</span> input_int &nbsp; &nbsp; &nbsp; <span style="color: #00007f;">=</span> <span style="color: #ff0000;">&quot;123&quot;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0000ff;">int</span> ret;<br />
&nbsp; &nbsp; ;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #007f00;">// be aware, str2int will convert 'non integers' to '0'</span><br />
&nbsp; &nbsp; <span style="color: #007f00;">// without warning</span><br />
&nbsp; &nbsp; info<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">strfmt</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;%1&quot;</span><span style="color: #00007f;">,</span> <span style="color: #0000ff;">str2int</span><span style="color: #000000;">&#40;</span>input_notint<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; info<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">strfmt</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;%1&quot;</span><span style="color: #00007f;">,</span> <span style="color: #0000ff;">str2int</span><span style="color: #000000;">&#40;</span>input_int<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #007f00;">// you can check if a string is an integer with </span><br />
&nbsp; &nbsp; <span style="color: #007f00;">// the isInteger() function from the global class</span><br />
&nbsp; &nbsp; <span style="color: #007f00;">// or you the str2IntOk() function</span><br />
&nbsp; &nbsp; info<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">strfmt</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;%1&quot;</span><span style="color: #00007f;">,</span> isInteger<span style="color: #000000;">&#40;</span>input_notint<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; info<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">strfmt</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;%1&quot;</span><span style="color: #00007f;">,</span> isInteger<span style="color: #000000;">&#40;</span>input_int<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #007f00;">// check if integer</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span>isInteger<span style="color: #000000;">&#40;</span>input_notint<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// cast to integer</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ret <span style="color: #00007f;">=</span> <span style="color: #0000ff;">str2int</span><span style="color: #000000;">&#40;</span>input_notint<span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">else</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">throw</span> error<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">strfmt</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;'%1' is not an integer&quot;</span><span style="color: #00007f;">,</span> input_notint<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2010/02/04/str2int-and-isinteger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delete an AX company on SQL</title>
		<link>http://www.artofcreation.be/2010/02/03/delete-an-ax-company-on-sql/</link>
		<comments>http://www.artofcreation.be/2010/02/03/delete-an-ax-company-on-sql/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 20:03:53 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=432</guid>
		<description><![CDATA[This week, we were shrinking a database of a development environment by deleting some companies.
Here a nice little SQL statement that uses the sp_MSforeachtable stored procedure to delete all records of a specific company (CEU in this case) from all tables.
exec sp_MSforeachtable 'delete from ? where ?.DataAreaID = &#34;CEU&#34;'
Certainly fast(er than AX) and gets the [...]]]></description>
			<content:encoded><![CDATA[<p>This week, we were shrinking a database of a development environment by deleting some companies.<br />
Here a nice little SQL statement that uses the sp_MSforeachtable stored procedure to delete all records of a specific company (CEU in this case) from all tables.</p>
<div class="codecolorer-container sql default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">exec sp_MSforeachtable <span style="color: #ff0000;">'delete from ? where ?.DataAreaID = &quot;CEU&quot;'</span></div></div>
<p>Certainly fast(er than AX) and gets the job done.<br />
Use at your own risk <img src='http://www.artofcreation.be/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><strong>Update:</strong><br />
You&#8217;ll want do do some cleaning up to:<br />
delete the company id from the DataArea table and from the CompanyDomainList table</p>
<div class="codecolorer-container sql default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold;">DELETE</span> <span style="color: #993333; font-weight: bold;">FROM</span> DataArea <span style="color: #993333; font-weight: bold;">WHERE</span> DataArea<span style="color: #66cc66;">.</span>ID <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'CEU'</span><br />
<span style="color: #993333; font-weight: bold;">DELETE</span> <span style="color: #993333; font-weight: bold;">FROM</span> CompanyDomainList <span style="color: #993333; font-weight: bold;">WHERE</span> CompanyDomainList<span style="color: #66cc66;">.</span>CompanyID <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'CEU'</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2010/02/03/delete-an-ax-company-on-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Axapta 3 menu in AX 2009</title>
		<link>http://www.artofcreation.be/2010/01/28/axapta-3-menu-in-ax-2009/</link>
		<comments>http://www.artofcreation.be/2010/01/28/axapta-3-menu-in-ax-2009/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 17:58:32 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Job]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=428</guid>
		<description><![CDATA[Are you one of those people who always minimize the content pane in AX 2009?
Are you one of those people who don&#8217;t know what the breadcrumb on top of the AX screen is for?
Do you already execute a job to disable the content pane on startup?
Then you might feel totally nostalgic when you see the [...]]]></description>
			<content:encoded><![CDATA[<p>Are you one of those people who always minimize the content pane in AX 2009?<br />
Are you one of those people who don&#8217;t know what the breadcrumb on top of the AX screen is for?<br />
Do you already execute a <a href="http://www.doens.be/2009/04/hide-irritating-content-pane-in-ax2009/">job to disable the content pane</a> on startup?</p>
<p>Then you might feel totally nostalgic when you see the Axapta 3 menu appearing after you run the following job in AX 2009.</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"><span style="color: #0000ff;">static</span> <span style="color: #0000ff;">void</span> Axapta30Nostalgia<span style="color: #000000;">&#40;</span>Args _args<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; Menu menu;<br />
&nbsp; &nbsp; #admin<br />
&nbsp; &nbsp; ;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; menu <span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> Menu<span style="color: #000000;">&#40;</span>#MainMenu<span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; menu.<span style="color: #000000;">AOTrun</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
<span style="color: #000000;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2010/01/28/axapta-3-menu-in-ax-2009/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Microsoft Dynamics AX 2009 Development Cookbook</title>
		<link>http://www.artofcreation.be/2010/01/12/microsoft-dynamics-ax-2009-development-cookbook/</link>
		<comments>http://www.artofcreation.be/2010/01/12/microsoft-dynamics-ax-2009-development-cookbook/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 18:11:20 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[Books]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=418</guid>
		<description><![CDATA[A new book written by Mindaugas Pocius about AX development was published last month: Microsoft Dynamics AX 2009 Development Cookbook.
The book contains step-by-step instructions along with screenshots and aims at Dynamics AX developers of beginner and intermediate level.
To give you an idea, here are the chapters:
Chapter 1: Processing Data
Chapter 2: Working with Forms
Chapter 3: Working [...]]]></description>
			<content:encoded><![CDATA[<p>A new book written by Mindaugas Pocius about AX development was published last month: Microsoft Dynamics AX 2009 Development Cookbook.</p>
<p>The book contains step-by-step instructions along with screenshots and aims at Dynamics AX developers of beginner and intermediate level.</p>
<p>To give you an idea, here are the chapters:<br />
Chapter 1: Processing Data<br />
Chapter 2: Working with Forms<br />
Chapter 3: Working with Data in Forms<br />
Chapter 4: Building Lookups<br />
Chapter 5: Processing Business Tasks<br />
Chapter 6: Integration with Microsoft Ofice</p>
<p>You can buy the book, eg on <a href="http://www.amazon.com/Microsoft-Dynamics-2009-Development-Cookbook/dp/1847199429">Amazon.com</a> or at <a href="http://www.packtpub.com/microsoft-dynamics-ax-2009-development-cookbook/book">Packt Publishing</a>.</p>
<p>You can also download the <a href="http://www.packtpub.com/files/code/9423_Code.zip">sample code</a> used in the book.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2010/01/12/microsoft-dynamics-ax-2009-development-cookbook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
