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

<channel>
	<title>Art Of Creation - Dynamics AX Blog &#187; Job</title>
	<atom:link href="http://www.artofcreation.be/tag/job/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.artofcreation.be</link>
	<description>The everyday life of a Dynamics AX developer</description>
	<lastBuildDate>Thu, 02 Feb 2012 12:20:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Data migration: Importing the InventItemGroupForm Table</title>
		<link>http://www.artofcreation.be/2011/11/08/data-migration-importing-the-inventitemgroupform-table/</link>
		<comments>http://www.artofcreation.be/2011/11/08/data-migration-importing-the-inventitemgroupform-table/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 10:23:53 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[2012]]></category>
		<category><![CDATA[Data conversion]]></category>
		<category><![CDATA[Data migration]]></category>
		<category><![CDATA[Job]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=1421</guid>
		<description><![CDATA[Hi everyone :-). I am tasked with doing data migration for a project that is about to go live. One of the things that have to be converted are item groups (InventItemGroup) and their linked dimensions (InventItemGroupForm). Importing the InventItemGroup table is easy, but InventItemGroupForm is a little bit trickier. There is a job below [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone :-). </p>
<p>I am tasked with doing data migration for a project that is about to go live. One of the things that have to be converted are item groups (InventItemGroup) and their linked dimensions (InventItemGroupForm). </p>
<p>Importing the InventItemGroup table is easy, but InventItemGroupForm is a little bit trickier.<br />
There is a job below that shows how to fill in the LedgerDimension field on the InventItemGroupForm table. I&#8217;m not saying I completely understand the new dimension framework, but this method worked for me, and I hope it helps you when you have to do the same thing. </p>
<p>You will notice that you won&#8217;t be able to import the InventItemGroupForm table with the excel add-on. You&#8217;ll have to use a custom job (or make you own import framework like I did). </p>
<p>This white paper can help too: <a href="http://technet.microsoft.com/en-us/library/hh272858.aspx">Implementing the Account and Financial Dimensions Framework (White paper)</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;">static</span> <span style="color: #0000ff;">void</span> klforDimensionTest<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: #007f00; font-style: italic;">/* input */</span><br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// the InventItemGroup record we want to set accounts for</span><br />
&nbsp; &nbsp; InventItemGroup &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; inventItemGroup <span style="color: #00007f;">=</span> InventItemGroup<span style="color: #00007f;">::</span><span style="color: #000000;">find</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;Car Audio&quot;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #007f00;">// the main account we want to link to our InventItemGroup</span><br />
&nbsp; &nbsp; MainAccountNum &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mainAccountNum <span style="color: #00007f;">=</span> <span style="color: #ff0000;">&quot;0107&quot;</span>;<br />
&nbsp; &nbsp; <span style="color: #007f00;">// The account type we are setting</span><br />
&nbsp; &nbsp; InventAccountType &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; inventAccountType <span style="color: #00007f;">=</span> InventAccountType<span style="color: #00007f;">::</span><span style="color: #000000;">InventIssue</span>;<br />
&nbsp; &nbsp; <span style="color: #007f00;">// the dimension group of the account type</span><br />
&nbsp; &nbsp; ItemGroupLedgerDimensionGroup &nbsp; &nbsp; &nbsp; itemGroupLedgerDimensionGroup <span style="color: #00007f;">=</span> ItemGroupLedgerDimensionGroup<span style="color: #00007f;">::</span><span style="color: #000000;">Inventory</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00; font-style: italic;">/* declarations */</span><br />
&nbsp; &nbsp; Ledger &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ledger;<br />
&nbsp; &nbsp; MainAccount &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mainAccount;<br />
&nbsp; &nbsp; DimensionAttributeValueCombination &nbsp;dimensionAttributeValueCombination;<br />
&nbsp; &nbsp; DimensionAttributeValue &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dimAttributeValue;<br />
&nbsp; &nbsp; DimensionAttribute &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dimAttribute;<br />
&nbsp; &nbsp; DimensionStorage &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dimStorage;<br />
&nbsp; &nbsp; RecId &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hierarchyRecId;<br />
<br />
&nbsp; &nbsp; DimensionStorageSegment &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dimensionStorageSegment;<br />
&nbsp; &nbsp; InventItemGroupForm &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; inventItemGroupForm;<br />
&nbsp; &nbsp; ;<br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span>inventItemGroup.<span style="color: #000000;">RecId</span> <span style="color: #00007f;">==</span> <span style="color: #000000;">0</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;">throw</span> error<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;InventItemGroup not found&quot;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// check if inventItemGroupForm record exists</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">select</span> <span style="color: #0000ff;">firstOnly</span> <span style="color: #0000ff;">forUpdate</span> inventItemGroupForm<br />
&nbsp; &nbsp; <span style="color: #0000ff;">where</span> &nbsp;inventItemGroupForm.<span style="color: #000000;">ItemGroupId</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00007f;">==</span> inventItemGroup.<span style="color: #000000;">ItemGroupId</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f;">&amp;&amp;</span> inventItemGroupForm.<span style="color: #000000;">InventAccountType</span> &nbsp; &nbsp;<span style="color: #00007f;">==</span> inventAccountType<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f;">&amp;&amp;</span> inventItemGroupForm.<span style="color: #000000;">LedgerDimensionGroup</span> <span style="color: #00007f;">==</span> itemGroupLedgerDimensionGroup;<br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span><span style="color: #00007f;">!</span>inventItemGroupForm<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// record does not exists, initialize it</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; inventItemGroupForm.<span style="color: #000000;">clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; inventItemGroupForm.<span style="color: #000000;">initValue</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; inventItemGroupForm.<span style="color: #000000;">ItemGroupId</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f;">=</span> inventItemGroup.<span style="color: #000000;">ItemGroupId</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; inventItemGroupForm.<span style="color: #000000;">InventAccountType</span> &nbsp; &nbsp; &nbsp; <span style="color: #00007f;">=</span> inventAccountType;<br />
&nbsp; &nbsp; &nbsp; &nbsp; inventItemGroupForm.<span style="color: #000000;">LedgerDimensionGroup</span> &nbsp; &nbsp;<span style="color: #00007f;">=</span> itemGroupLedgerDimensionGroup;<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// get the ledger record for the current company</span><br />
&nbsp; &nbsp; ledger <span style="color: #00007f;">=</span> Ledger<span style="color: #00007f;">::</span><span style="color: #000000;">findByLegalEntity</span><span style="color: #000000;">&#40;</span>CompanyInfo<span style="color: #00007f;">::</span><span style="color: #000000;">current</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// lookup main account record</span><br />
&nbsp; &nbsp; mainAccount <span style="color: #00007f;">=</span> MainAccount<span style="color: #00007f;">::</span><span style="color: #000000;">findByMainAccountId</span><span style="color: #000000;">&#40;</span>mainAccountNum<span style="color: #00007f;">,</span> <span style="color: #0000ff;">false</span><span style="color: #00007f;">,</span> ledger.<span style="color: #000000;">ChartOfAccounts</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span> <span style="color: #000000;">&#40;</span>mainAccount.<span style="color: #000000;">RecId</span> <span style="color: #00007f;">==</span> <span style="color: #000000;">0</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;">throw</span> error<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;MainAccount not found&quot;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// check if DAVC exists</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">select</span> <span style="color: #0000ff;">firstOnly</span> dimensionAttributeValueCombination<br />
&nbsp; &nbsp; <span style="color: #0000ff;">where</span> dimensionAttributeValueCombination.<span style="color: #000000;">MainAccount</span> <span style="color: #00007f;">==</span> mainAccount.<span style="color: #000000;">RecId</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #00007f;">&amp;&amp;</span> dimensionAttributeValueCombination.<span style="color: #000000;">AccountStructure</span> <span style="color: #00007f;">==</span> <span style="color: #000000;">0</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #00007f;">&amp;&amp;</span> dimensionAttributeValueCombination.<span style="color: #000000;">LedgerDimensionType</span> <span style="color: #00007f;">==</span> LedgerDimensionType<span style="color: #00007f;">::</span><span style="color: #000000;">DefaultAccount</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// when the DAVC does not exist, create it</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span>dimensionAttributeValueCombination.<span style="color: #000000;">RecId</span> <span style="color: #00007f;">==</span> <span style="color: #000000;">0</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;">// Cache the dimension attribute that represents the Main account</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">select</span> <span style="color: #0000ff;">firstonly</span> <span style="color: #00007f;">*</span> <span style="color: #0000ff;">from</span> dimAttribute <span style="color: #0000ff;">where</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dimAttribute.<span style="color: #000000;">RecId</span> <span style="color: #00007f;">==</span> DimensionAttribute<span style="color: #00007f;">::</span><span style="color: #000000;">getMainAccountDimensionAttribute</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// Lookup the DAV backing the main account instance</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; dimAttributeValue <span style="color: #00007f;">=</span> DimensionAttributeValue<span style="color: #00007f;">::</span><span style="color: #000000;">findByDimensionAttributeAndEntityInst</span><span style="color: #000000;">&#40;</span>dimAttribute.<span style="color: #000000;">RecId</span><span style="color: #00007f;">,</span> mainAccount.<span style="color: #000000;">RecId</span><span style="color: #00007f;">,</span> <span style="color: #0000ff;">false</span><span style="color: #00007f;">,</span> <span style="color: #0000ff;">true</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// lookup the hierarchy for the default acount</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; hierarchyRecId <span style="color: #00007f;">=</span> DimensionHierarchy<span style="color: #00007f;">::</span><span style="color: #000000;">getHierarchyIdByHierarchyType</span><span style="color: #000000;">&#40;</span>DimensionHierarchyType<span style="color: #00007f;">::</span><span style="color: #000000;">DefaultAccount</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// create new storage</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; dimStorage <span style="color: #00007f;">=</span> DimensionStorage<span style="color: #00007f;">::</span><span style="color: #000000;">construct</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// add the default account structure hierarchy</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; dimStorage.<span style="color: #000000;">addAccountStructure</span><span style="color: #000000;">&#40;</span>hierarchyRecId<span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// create storage segment for the value</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; dimensionStorageSegment <span style="color: #00007f;">=</span> DimensionStorageSegment<span style="color: #00007f;">::</span><span style="color: #000000;">construct</span><span style="color: #000000;">&#40;</span>mainAccountNum<span style="color: #00007f;">,</span> dimAttributeValue.<span style="color: #000000;">RecId</span><span style="color: #00007f;">,</span> dimAttributeValue.<span style="color: #000000;">HashKey</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// add the segment to the storage</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; dimStorage.<span style="color: #000000;">setSegment</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #00007f;">,</span> dimensionStorageSegment<span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// save storage as default account and get the record</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; dimensionAttributeValueCombination <span style="color: #00007f;">=</span> DimensionAttributeValueCombination<span style="color: #00007f;">::</span><span style="color: #000000;">find</span><span style="color: #000000;">&#40;</span>dimStorage.<span style="color: #000000;">saveAsDefaultAccount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// set the ledgerdimension reference field</span><br />
&nbsp; &nbsp; inventItemGroupForm.<span style="color: #000000;">LedgerDimension</span> <span style="color: #00007f;">=</span> dimensionAttributeValueCombination.<span style="color: #000000;">RecId</span>;<br />
&nbsp; &nbsp; <span style="color: #007f00;">// call modifiedfield voor ledgerdimension field to sync inventPosting</span><br />
&nbsp; &nbsp; inventItemGroupForm.<span style="color: #000000;">modifiedField</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">fieldNum</span><span style="color: #000000;">&#40;</span>InventItemGroupForm<span style="color: #00007f;">,</span> LedgerDimension<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">ttsBegin</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span>inventItemGroupForm.<span style="color: #000000;">recid</span> <span style="color: #00007f;">==</span> <span style="color: #000000;">0</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;">// insert if this is a new record</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; inventItemGroupForm.<span style="color: #000000;">insert</span><span style="color: #000000;">&#40;</span><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: #007f00;">// update existing record</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; inventItemGroupForm.<span style="color: #000000;">update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">ttsCommit</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>Comments with ideas / insights / improvements are welcome as always. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2011/11/08/data-migration-importing-the-inventitemgroupform-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trivial: by in group by is optional</title>
		<link>http://www.artofcreation.be/2010/08/04/trivial-by-in-group-by-is-optional/</link>
		<comments>http://www.artofcreation.be/2010/08/04/trivial-by-in-group-by-is-optional/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 16:11:45 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[Compiler]]></category>
		<category><![CDATA[Job]]></category>
		<category><![CDATA[Syntax]]></category>
		<category><![CDATA[Trivial]]></category>
		<category><![CDATA[X++]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=880</guid>
		<description><![CDATA[Here is something I did not know: apparently, the &#8216;by&#8217; in &#8216;group by&#8217; is optional. The following job compiles just fine, and outputs the correct result: static void KlForGroupBy&#40;Args _args&#41; &#123; &#160; &#160; InventTable inventTable; &#160; &#160; ; &#160; &#160; &#160; &#160; while select inventTable &#160; &#160; group by ItemGroupId &#160; &#160; &#123; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Here is something I did not know: apparently, the &#8216;by&#8217; in &#8216;group by&#8217; is optional. </p>
<p>The following job compiles just fine, and outputs the correct result:</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> KlForGroupBy<span style="color: #000000;">&#40;</span>Args _args<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; InventTable inventTable;<br />
&nbsp; &nbsp; ;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0000ff;">while</span> <span style="color: #0000ff;">select</span> inventTable<br />
&nbsp; &nbsp; <span style="color: #0000ff;">group by</span> ItemGroupId<br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; info<span style="color: #000000;">&#40;</span>inventTable.<span style="color: #000000;">ItemGroupId</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; info<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'------'</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0000ff;">while</span> <span style="color: #0000ff;">select</span> inventTable<br />
&nbsp; &nbsp; group ItemGroupId <span style="color: #007f00;">// without by</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; info<span style="color: #000000;">&#40;</span>inventTable.<span style="color: #000000;">ItemGroupId</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>
<p>It looks funny though :-). </p>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2010/08/04/trivial-by-in-group-by-is-optional/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Split big text files in smaller ones in X++</title>
		<link>http://www.artofcreation.be/2010/04/21/split-big-text-files-in-smaller-ones-in-x/</link>
		<comments>http://www.artofcreation.be/2010/04/21/split-big-text-files-in-smaller-ones-in-x/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 16:16:12 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[Job]]></category>
		<category><![CDATA[System.IO]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=703</guid>
		<description><![CDATA[Below is a job I found useful many times, so don&#8217;t want to loose it. Nothing special, but maybe you&#8217;ll find it useful too. It splits an input text file into smaller files. As there is one comment line for every line of code (almost), I&#8217;m sure you&#8217;ll figure it out :-). static void KlForSplitFile&#40;Args [...]]]></description>
			<content:encoded><![CDATA[<p>Below is a job I found useful many times, so don&#8217;t want to loose it.<br />
Nothing special, but maybe you&#8217;ll find it useful too. </p>
<p>It splits an input text file into smaller files.<br />
As there is one comment line for every line of code (almost), I&#8217;m sure you&#8217;ll figure it out :-).</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> KlForSplitFile<span style="color: #000000;">&#40;</span>Args _args<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; #File<br />
&nbsp; &nbsp; AsciiIO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; inFile<span style="color: #00007f;">,</span> outFile;<br />
&nbsp; &nbsp; <span style="color: #0000ff;">container</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rec;<br />
&nbsp; &nbsp; <span style="color: #0000ff;">int</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cnt <span style="color: #00007f;">=</span> <span style="color: #000000;">0</span><span style="color: #00007f;">,</span> fileNum &nbsp; &nbsp;<span style="color: #00007f;">=</span> <span style="color: #000000;">0</span>;<br />
&nbsp; &nbsp; FileName &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;outFileName;<br />
&nbsp; &nbsp; FileIOPermission &nbsp; &nbsp;filePermissionOrig<span style="color: #00007f;">,</span> outFilePermission;<br />
&nbsp; &nbsp; Set &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; permissionSet <span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> set<span style="color: #000000;">&#40;</span>types<span style="color: #00007f;">::</span><span style="color: #0000ff;">Class</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// settings begin</span><br />
&nbsp; &nbsp; <span style="color: #007f00;">// input file</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">str</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _inFileName <span style="color: #00007f;">=</span> @<span style="color: #ff0000;">&quot;C:<span style="color: #000000;">\t</span>emp<span style="color: #000000;">\t</span>estsplit<span style="color: #000000;">\t</span>estsplit.csv&quot;</span>;<br />
&nbsp; &nbsp; <span style="color: #007f00;">// max number of lines</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">int</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _maxrec <span style="color: #00007f;">=</span> <span style="color: #000000;">20000</span>;<br />
&nbsp; &nbsp; <span style="color: #007f00;">//settings end</span><br />
&nbsp; &nbsp; ;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">//</span><br />
&nbsp; &nbsp; <span style="color: #007f00;">// first loop to create the permission set</span><br />
&nbsp; &nbsp; <span style="color: #007f00;">//</span><br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// assert permission for read</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">new</span> FileIOPermission<span style="color: #000000;">&#40;</span>_inFileName<span style="color: #00007f;">,</span> #io_read<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">assert</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// create new asciiIo for the file we are reading in</span><br />
&nbsp; &nbsp; inFile &nbsp;<span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> AsciiIo<span style="color: #000000;">&#40;</span>_inFileName<span style="color: #00007f;">,</span>#io_read<span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// read file to check how many files will be created</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">while</span><span style="color: #000000;">&#40;</span>inFile.<span style="color: #000000;">read</span><span style="color: #000000;">&#40;</span><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: #0000ff;">if</span><span style="color: #000000;">&#40;</span>cnt <span style="color: #00007f;">==</span> _maxrec <span style="color: #00007f;">||</span> cnt <span style="color: #00007f;">==</span> <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// 1 more file</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; filenum<span style="color: #00007f;">++</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// create filename</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outFileName <span style="color: #00007f;">=</span> <span style="color: #0000ff;">strfmt</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'%1_%2.csv'</span><span style="color: #00007f;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">substr</span><span style="color: #000000;">&#40;</span>_inFileName<span style="color: #00007f;">,</span><span style="color: #000000;">1</span><span style="color: #00007f;">,</span><span style="color: #0000ff;">strlen</span><span style="color: #000000;">&#40;</span>_inFileName<span style="color: #000000;">&#41;</span> <span style="color: #00007f;">-</span> <span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span><span style="color: #00007f;">,</span> fileNum<span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// create permission</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outFilePermission <span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> FileIOPermission<span style="color: #000000;">&#40;</span>outFileName<span style="color: #00007f;">,</span>#io_write<span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// add permission to set</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; permissionset.<span style="color: #000000;">add</span><span style="color: #000000;">&#40;</span>outFilePermission<span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// reset line counter</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cnt <span style="color: #00007f;">=</span> <span style="color: #000000;">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// 1 more line</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; cnt<span style="color: #00007f;">++</span>;<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// also add fileIn permission to set</span><br />
&nbsp; &nbsp; filePermissionOrig <span style="color: #00007f;">=</span> &nbsp;<span style="color: #0000ff;">new</span> FileIOPermission<span style="color: #000000;">&#40;</span>_inFileName<span style="color: #00007f;">,</span> #io_read<span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; permissionset.<span style="color: #000000;">add</span><span style="color: #000000;">&#40;</span>filePermissionOrig<span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #007f00;">// revert permission assertion</span><br />
&nbsp; &nbsp; CodeAccessPermission<span style="color: #00007f;">::</span><span style="color: #000000;">revertAssert</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// assert permissions for set</span><br />
&nbsp; &nbsp; CodeAccessPermission<span style="color: #00007f;">::</span><span style="color: #000000;">assertMultiple</span><span style="color: #000000;">&#40;</span>permissionset<span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">//</span><br />
&nbsp; &nbsp; <span style="color: #007f00;">// loop file again and split</span><br />
&nbsp; &nbsp; <span style="color: #007f00;">//</span><br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// reset counters</span><br />
&nbsp; &nbsp; fileNum <span style="color: #00007f;">=</span> <span style="color: #000000;">0</span>;<br />
&nbsp; &nbsp; cnt &nbsp; &nbsp; <span style="color: #00007f;">=</span> <span style="color: #000000;">0</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// create new asciiIo for the file we are reading in</span><br />
&nbsp; &nbsp; inFile &nbsp;<span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> AsciiIo<span style="color: #000000;">&#40;</span>_inFileName<span style="color: #00007f;">,</span>#io_read<span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// read file to check how many files will be created</span><br />
&nbsp; &nbsp; <span style="color: #007f00;">// read ahead</span><br />
&nbsp; &nbsp; rec <span style="color: #00007f;">=</span> inFile.<span style="color: #000000;">read</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #0000ff;">while</span><span style="color: #000000;">&#40;</span>rec<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span>cnt <span style="color: #00007f;">==</span> _maxrec <span style="color: #00007f;">||</span> cnt <span style="color: #00007f;">==</span> <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// 1 more file</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; filenum<span style="color: #00007f;">++</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// create filename</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outFileName <span style="color: #00007f;">=</span> <span style="color: #0000ff;">strfmt</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'%1_%2.csv'</span><span style="color: #00007f;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">substr</span><span style="color: #000000;">&#40;</span>_inFileName<span style="color: #00007f;">,</span><span style="color: #000000;">1</span><span style="color: #00007f;">,</span><span style="color: #0000ff;">strlen</span><span style="color: #000000;">&#40;</span>_inFileName<span style="color: #000000;">&#41;</span> <span style="color: #00007f;">-</span> <span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span><span style="color: #00007f;">,</span> fileNum<span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outFile <span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> AsciiIO<span style="color: #000000;">&#40;</span>outFileName<span style="color: #00007f;">,</span>#io_write<span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// reset line counter</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cnt <span style="color: #00007f;">=</span> <span style="color: #000000;">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// 1 more line</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; cnt<span style="color: #00007f;">++</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// write to split file</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; outFile.<span style="color: #000000;">writeExp</span><span style="color: #000000;">&#40;</span>rec<span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// read next line</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; rec <span style="color: #00007f;">=</span> inFile.<span style="color: #000000;">read</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// revert permission assertion</span><br />
&nbsp; &nbsp; CodeAccessPermission<span style="color: #00007f;">::</span><span style="color: #000000;">revertAssert</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;">'done'</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/04/21/split-big-text-files-in-smaller-ones-in-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AIF: The class method for the specified action %1 could not be found</title>
		<link>http://www.artofcreation.be/2010/04/14/aif-the-class-method-for-the-specified-action-1-could-not-be-found/</link>
		<comments>http://www.artofcreation.be/2010/04/14/aif-the-class-method-for-the-specified-action-1-could-not-be-found/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 16:13:46 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[AIF]]></category>
		<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[Job]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=678</guid>
		<description><![CDATA[When you get this error: The class method for the specified action %1 could not be found It probably means you have regenerated you classes using the AIF document wizard, or that you have imported the AIF classes without id&#8217;s. You can use this job to fix the class id&#8217;s in the AIFAction table: static [...]]]></description>
			<content:encoded><![CDATA[<p>When you get this error:</p>
<blockquote><p>The class method for the specified action %1 could not be found</p></blockquote>
<p>It probably means you have regenerated you classes using the AIF document wizard, or that you have imported the AIF classes without id&#8217;s. </p>
<p>You can use this job to fix the class id&#8217;s in the AIFAction table:</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> KlForFixAIFActions<span style="color: #000000;">&#40;</span>Args _args<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; AIFAction &nbsp; aIFAction;<br />
&nbsp; &nbsp; ClassId &nbsp; &nbsp; classId;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// inner method:</span><br />
&nbsp; &nbsp; <span style="color: #007f00;">// spit string at delimeter, keep left substring</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">str</span> lSplit<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">str</span> _s<span style="color: #00007f;">,</span> <span style="color: #0000ff;">str</span> _delimeter <span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">str</span> s <span style="color: #00007f;">=</span> <span style="color: #ff0000;">&quot;&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">int</span> pos;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">int</span> len <span style="color: #00007f;">=</span> <span style="color: #0000ff;">strlen</span><span style="color: #000000;">&#40;</span> _s <span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; pos <span style="color: #00007f;">=</span> <span style="color: #0000ff;">strfind</span><span style="color: #000000;">&#40;</span> _s<span style="color: #00007f;">,</span> _delimeter<span style="color: #00007f;">,</span> <span style="color: #000000;">0</span><span style="color: #00007f;">,</span> len <span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; s <span style="color: #00007f;">=</span> <span style="color: #0000ff;">strdel</span><span style="color: #000000;">&#40;</span> _s<span style="color: #00007f;">,</span>pos<span style="color: #00007f;">,</span>len<span style="color: #00007f;">-</span>pos<span style="color: #00007f;">+</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> s;<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; ;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// fix all actions</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">while</span> <span style="color: #0000ff;">select</span> aIFAction<br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// get 'real' classid</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; classId <span style="color: #00007f;">=</span> classname2id<span style="color: #000000;">&#40;</span>lSplit<span style="color: #000000;">&#40;</span>aIFAction.<span style="color: #000000;">ActionId</span><span style="color: #00007f;">,</span> <span style="color: #ff0000;">'.'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// check if classid and classname match</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span>aIFAction.<span style="color: #000000;">ClassId</span> <span style="color: #00007f;">!=</span> classId<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span>classId <span style="color: #00007f;">==</span> <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// class does not exist</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; warning<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">strfmt</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">&quot;Class %1 does not exist&quot;</span><span style="color: #00007f;">,</span> lSplit<span style="color: #000000;">&#40;</span>aIFAction.<span style="color: #000000;">ActionId</span><span style="color: #00007f;">,</span> <span style="color: #ff0000;">'.'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// doesn't match</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// update classid</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ttsbegin</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aIFAction.<span style="color: #000000;">selectForUpdate</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">true</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aIFAction.<span style="color: #000000;">ClassId</span> <span style="color: #00007f;">=</span> classId;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aIFAction.<span style="color: #000000;">update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &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;">'Action %1 updated'</span><span style="color: #00007f;">,</span> aIFAction.<span style="color: #000000;">ActionId</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ttscommit</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; info<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'done'</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/04/14/aif-the-class-method-for-the-specified-action-1-could-not-be-found/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Remove duplicate key entry from a table</title>
		<link>http://www.artofcreation.be/2010/04/12/remove-duplicate-key-entry-in-a-table/</link>
		<comments>http://www.artofcreation.be/2010/04/12/remove-duplicate-key-entry-in-a-table/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 16:12:08 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Job]]></category>
		<category><![CDATA[synchronize]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=547</guid>
		<description><![CDATA[Sometimes, you can&#8217;t synchronize a table because is contains duplicate records. This can occur when you change field lengths on a extended data type for example. I’ve seen people write huge SQL statements, and even jobs that create these SQL statements to remove these duplicates from a table, but there’s actually a easy way to [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, you can&#8217;t synchronize a table because is contains duplicate records. This can occur when you change field lengths on a extended data type for example. </p>
<p>I’ve seen people write huge SQL statements, and even jobs that create these SQL statements to remove these duplicates from a table, but there’s actually a easy way to do this in AX. </p>
<p>Say you have a table KLFTestDuplicates that contains duplicates, then simple run the following job to remove them.</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> KLFRemoveDuplicates<span style="color: #000000;">&#40;</span>Args _args<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; Set fieldSet <span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> set<span style="color: #000000;">&#40;</span>Types<span style="color: #00007f;">::</span><span style="color: #000000;">Integer</span><span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; DictIndex &nbsp;dictIndex <span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> DictIndex<span style="color: #000000;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">tablenum</span><span style="color: #000000;">&#40;</span>KLFTestDuplicates<span style="color: #000000;">&#41;</span><span style="color: #00007f;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">indexnum</span><span style="color: #000000;">&#40;</span>KLFTestDuplicates<span style="color: #00007f;">,</span> AUniqueIdx<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #0000ff;">int</span> i;<br />
&nbsp; &nbsp; ;<br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span>dictIndex.<span style="color: #000000;">numberOfFields</span><span style="color: #000000;">&#40;</span><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: #0000ff;">for</span><span style="color: #000000;">&#40;</span>i<span style="color: #00007f;">=</span><span style="color: #000000;">1</span>;i<span style="color: #00007f;">&lt;=</span>dictIndex.<span style="color: #000000;">numberOfFields</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;i<span style="color: #00007f;">++</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fieldSet.<span style="color: #000000;">add</span><span style="color: #000000;">&#40;</span>dictIndex.<span style="color: #000000;">field</span><span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; ReleaseUpdateDB<span style="color: #00007f;">::</span><span style="color: #000000;">indexAllowDup</span><span style="color: #000000;">&#40;</span>dictIndex<span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; ReleaseUpdateDB<span style="color: #00007f;">::</span><span style="color: #000000;">deleteDuplicatesUsingIds</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">tablenum</span><span style="color: #000000;">&#40;</span>KLFTestDuplicates<span style="color: #000000;">&#41;</span><span style="color: #00007f;">,</span> <span style="color: #000000;">0</span><span style="color: #00007f;">,</span> fieldSet<span style="color: #000000;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; ReleaseUpdateDB<span style="color: #00007f;">::</span><span style="color: #000000;">indexAllowNoDup</span><span style="color: #000000;">&#40;</span>dictIndex<span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</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>Remember: this is useful when developing and testing, but it will remove data from you database, so use it with caution. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2010/04/12/remove-duplicate-key-entry-in-a-table/feed/</wfw:commentRss>
		<slash:comments>0</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 [...]]]></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>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 [...]]]></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>Run multiple jobs</title>
		<link>http://www.artofcreation.be/2009/11/05/run-multiple-jobs/</link>
		<comments>http://www.artofcreation.be/2009/11/05/run-multiple-jobs/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 17:34:29 +0000</pubDate>
		<dc:creator>Klaas Deforche</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[Job]]></category>

		<guid isPermaLink="false">http://www.artofcreation.be/?p=318</guid>
		<description><![CDATA[I&#8217;ve noticed some people are visiting this blog looking for code that runs multiple jobs, so here&#8217;s a job that does just that. static void KlFor_runMultipleJobsContainer&#40;Args _args&#41; &#123; &#160; &#160; #AOT &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;// macro for treenode paths &#160; &#160; Container &#160; jobCont; &#160; &#160;// container for jobs [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve noticed some people are visiting this blog looking for code that runs multiple jobs, so here&#8217;s a job that does just that.</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> KlFor_runMultipleJobsContainer<span style="color: #000000;">&#40;</span>Args _args<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; #AOT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #007f00;">// macro for treenode paths</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">Container</span> &nbsp; jobCont; &nbsp; &nbsp;<span style="color: #007f00;">// container for jobs</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">int</span> &nbsp; &nbsp; &nbsp; &nbsp; i; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #007f00;">// counter for loop</span><br />
&nbsp; &nbsp; ;<br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// add jobs to the container</span><br />
&nbsp; &nbsp; jobCont <span style="color: #00007f;">=</span> <span style="color: #0000ff;">conins</span><span style="color: #000000;">&#40;</span>jobCont<span style="color: #00007f;">,</span> <span style="color: #0000ff;">conlen</span><span style="color: #000000;">&#40;</span>jobCont<span style="color: #000000;">&#41;</span> <span style="color: #00007f;">+</span> <span style="color: #000000;">1</span><span style="color: #00007f;">,</span> <span style="color: #ff0000;">&quot;klforjob2&quot;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; jobCont <span style="color: #00007f;">=</span> <span style="color: #0000ff;">conins</span><span style="color: #000000;">&#40;</span>jobCont<span style="color: #00007f;">,</span> <span style="color: #0000ff;">conlen</span><span style="color: #000000;">&#40;</span>jobCont<span style="color: #000000;">&#41;</span> <span style="color: #00007f;">+</span> <span style="color: #000000;">1</span><span style="color: #00007f;">,</span> <span style="color: #ff0000;">&quot;klforjob3&quot;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; jobCont <span style="color: #00007f;">=</span> <span style="color: #0000ff;">conins</span><span style="color: #000000;">&#40;</span>jobCont<span style="color: #00007f;">,</span> <span style="color: #0000ff;">conlen</span><span style="color: #000000;">&#40;</span>jobCont<span style="color: #000000;">&#41;</span> <span style="color: #00007f;">+</span> <span style="color: #000000;">1</span><span style="color: #00007f;">,</span> <span style="color: #ff0000;">&quot;klforjob2&quot;</span><span style="color: #000000;">&#41;</span>; &nbsp; &nbsp;<span style="color: #007f00;">// run klforjob2 again</span><br />
<br />
&nbsp; &nbsp; <span style="color: #007f00;">// loop all elements of the container</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">for</span><span style="color: #000000;">&#40;</span>i <span style="color: #00007f;">=</span> <span style="color: #000000;">1</span>; i <span style="color: #00007f;">&lt;=</span> <span style="color: #0000ff;">conlen</span><span style="color: #000000;">&#40;</span>jobCont<span style="color: #000000;">&#41;</span>; i<span style="color: #00007f;">++</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;">// check if the job exists to avoid errors</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">if</span><span style="color: #000000;">&#40;</span>TreeNode<span style="color: #00007f;">::</span><span style="color: #000000;">findNode</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">strfmt</span><span style="color: #000000;">&#40;</span>#JobPath<span style="color: #00007f;">,</span> <span style="color: #0000ff;">conpeek</span><span style="color: #000000;">&#40;</span>jobCont<span style="color: #00007f;">,</span> i<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007f00;">// run job</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TreeNode<span style="color: #00007f;">::</span><span style="color: #000000;">findNode</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">strfmt</span><span style="color: #000000;">&#40;</span>#JobPath<span style="color: #00007f;">,</span> <span style="color: #0000ff;">conpeek</span><span style="color: #000000;">&#40;</span>jobCont<span style="color: #00007f;">,</span> i<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>.<span style="color: #000000;">AOTrun</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Easy enough :). </p>
]]></content:encoded>
			<wfw:commentRss>http://www.artofcreation.be/2009/11/05/run-multiple-jobs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

