<?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>NextEqualZero.com &#187; Bugs</title>
	<atom:link href="http://www.nextequalzero.com/category/bugs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nextequalzero.com</link>
	<description>A technical eye on Microsoft Dynamics NAV</description>
	<lastBuildDate>Fri, 05 Feb 2010 17:30:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Bug in the &#8216;Transfer Bank Recon. to General Journal&#8217; batch job</title>
		<link>http://www.nextequalzero.com/2009/07/transfer-bank-recon-bug/</link>
		<comments>http://www.nextequalzero.com/2009/07/transfer-bank-recon-bug/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 16:56:31 +0000</pubDate>
		<dc:creator>Ian Crocker</dc:creator>
				<category><![CDATA[Bugs]]></category>
		<category><![CDATA[2009]]></category>
		<category><![CDATA[classic]]></category>

		<guid isPermaLink="false">http://www.nextequalzero.com/?p=309</guid>
		<description><![CDATA[Problem: The Trans. Bank Rec. to Gen. Jnl. batch job doesn&#8217;t apply template filter correctly on the request form.
Affects: Dynamics NAV 2009 Classic

When using the Bank Acc. Reconciliation we have the option to transfer bank transactions that need to be posted to a journal.
This is done via the Trans. Bank Rec. to Gen. Jnl. batch job.
On [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong>: The <em>Trans. Bank Rec. to Gen. Jnl.</em> batch job doesn&#8217;t apply template filter correctly on the request form.</p>
<p><strong>Affects</strong>: Dynamics NAV 2009 Classic</p>
<p><span id="more-309"></span></p>
<p>When using the <em>Bank Acc. Reconciliation</em> we have the option to transfer bank transactions that need to be posted to a journal.</p>
<p>This is done via the <em>Trans. Bank Rec. to Gen. Jnl.</em> batch job.</p>
<p>On running the batch job, a destination journal is selected by completing the <em>Gen. Journal Template</em> and <em>Gen. Journal Batch</em> fields on the request form</p>
<p>In my example I select the CASHRCPT journal template which has the following batches setup:</p>
<p><a href="http://www.nextequalzero.com/wp-content/uploads/2009/07/03-cash-rcpt-journal-batches.jpg"><img class="alignnone size-full wp-image-330" title="03-cash-rcpt-journal-batches" src="http://www.nextequalzero.com/wp-content/uploads/2009/07/03-cash-rcpt-journal-batches.jpg" alt="03-cash-rcpt-journal-batches" width="347" height="124" /></a></p>
<p><span style="color: #0000ee; text-decoration: underline;"><a href="http://www.nextequalzero.com/wp-content/uploads/2009/07/03-cash-rcpt-journal-batches.jpg"></a></span></p>
<p>On looking up to select the required batch I get the following:</p>
<p><a href="http://www.nextequalzero.com/wp-content/uploads/2009/07/02-trans-to-gen-jnl-batches-wrong.jpg"><img class="alignnone size-full wp-image-315" title="02-trans-to-gen-jnl-batches-wrong" src="http://www.nextequalzero.com/wp-content/uploads/2009/07/02-trans-to-gen-jnl-batches-wrong.jpg" alt="02-trans-to-gen-jnl-batches-wrong" width="381" height="253" /></a></p>
<p>Where are my batches associated with this template?</p>
<p>The problem is caused by the default lookup form for the <em>General Journal Batch</em> table, which is Form 251, the one shown when looking up for a batch.</p>
<p>This form contains the following code in the OnInit() trigger which promptly kills filters put in place by the batch job.</p>
<pre>SETRANGE("Journal Template Name");</pre>
<p>To fix the problem, modify the code in the OnInit() trigger as follows:</p>
<pre>IF "Journal Template Name" &lt;&gt; '' THEN
 SETRANGE("Journal Template Name");</pre>
<p>The correct batches for the selected journal template will now be shown:</p>
<p><a href="http://www.nextequalzero.com/wp-content/uploads/2009/07/04-trans-to-gen-jnl-batches-correct.jpg"><img class="alignnone size-full wp-image-327" title="04-trans-to-gen-jnl-batches-correct" src="http://www.nextequalzero.com/wp-content/uploads/2009/07/04-trans-to-gen-jnl-batches-correct.jpg" alt="04-trans-to-gen-jnl-batches-correct" width="382" height="255" /></a></p>
<p>This bug only presents itself in Dynamics NAV 2009 when running the Classic client.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nextequalzero.com/2009/07/transfer-bank-recon-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error when Sending to Microsoft Excel</title>
		<link>http://www.nextequalzero.com/2007/09/error-when-sending-to-microsoft-excel/</link>
		<comments>http://www.nextequalzero.com/2007/09/error-when-sending-to-microsoft-excel/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 18:17:46 +0000</pubDate>
		<dc:creator>Ian Crocker</dc:creator>
				<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://localhost:8888/nextequalzero/?p=35</guid>
		<description><![CDATA[New functionality in Dynamics NAV 5 allows you to export the data from any form in the application to Microsoft Word or Excel by pressing the Send To&#8230; buttons on the toolbar.
However, try running the G/L Account List (18) form for example and then clicking Send to Microsoft Office Excel and you&#8217;ll receive the following error:


What causes the error? [...]]]></description>
			<content:encoded><![CDATA[<p>New functionality in Dynamics NAV 5 allows you to export the data from any form in the application to Microsoft Word or Excel by pressing the Send To&#8230; buttons on the toolbar.</p>
<p>However, try running the <strong>G/L Account List</strong> (18) form for example and then clicking <strong>Send to Microsoft Office Excel</strong> and you&#8217;ll receive the following error:</p>
<p><span id="more-13"></span></p>
<p><a href="http://www.nextequalzero.com/wp-content/uploads/2008/07/problems_during_load.png"><img class="alignnone size-full wp-image-41" title="problems_during_load" src="http://www.nextequalzero.com/wp-content/uploads/2008/07/problems_during_load.png" alt="" width="275" height="151" /></a></p>
<p>What causes the error? It&#8217;s the forward slash in the object name, or to be more exact, in the Caption/CaptionML porperty.</p>
<p>For list type forms, Dynamics NAV passes the forms caption as the Worksheet name and as Excel doesn&#8217;t allow forward slashes in Worksheet names, the error is triggered.</p>
<p>For tabular type forms, the caption of each page in the tab is passed as the Worksheet names, so if you happen to have a PageName which contains a forward slash the error will once again be triggered.</p>
<p>These other characters will also cause problems for Excel: <strong>\ ? &#8216; : *</strong></p>
<p>The workaround until Microsoft hotfixes the executable is to modify the Caption property of the affected Form or PageName.</p>
<p>Thanks to <a title="www.verbeiaconsulting.co.uk" href="http://www.verbeiaconsulting.co.uk/">Jon</a> for spotting this one.</p>
<p><strong>Update</strong></p>
<p>After a little further investigation I realised that it would be possible to intercept the XML stream before it reaches Excel, remove any offending characters and therefore prevent the error message from occuring without having to hack the caption. </p>
<p>Here&#8217;s the fix:</p>
<p>Open <code>Codeunit 403 Application Launch Management</code> and copy the <code>GetAttributeValue</code>function then rename it <code>RemoveInvalidCharacters</code>.</p>
<p>Change the function so it has no return value.</p>
<p>Keep the first three lines of code intact but remove the <code>EXIT</code> statement:</p>
<div class="geshi no pascal">
<ol>
<li class="li1">
<div class="de1">EXIT<span class="br0">&#40;</span>AttributeNode.<span class="me1">text</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<p>Insert the following code with local variables as appropriate:</p>
<div class="geshi no pascal">
<ol>
<li class="li1">
<div class="de1">InvalidCharacters := <span class="st0">&#39;/<span class="es0">\?</span>&#39;</span><span class="st0">&#39;:*&#39;</span>;</div>
</li>
<li class="li1">
<div class="de1">NewNodeText := AttributeNode.<span class="me1">text</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">FOR</span> i := <span class="nu0">1</span> <span class="kw1">TO</span> STRLEN<span class="br0">&#40;</span>InvalidCharacters<span class="br0">&#41;</span> <span class="kw1">DO</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; NewNodeText := DELCHR <span class="br0">&#40;</span>NewNodeText,<span class="st0">&#39;=&#39;</span>,COPYSTR<span class="br0">&#40;</span>InvalidCharacters,i,<span class="nu0">1</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">AttributeNode.<span class="me1">text</span> := NewNodeText;</div>
</li>
</ol>
</div>
<p>Place the call to the new function in the LaunchApp function. Anywhere should be ok as long as it is positioned before the call to TransformDocument:</p>
<p>All forms with offending characters in the caption such as the G/L Account List will now work correctly.</p>
<p>Got any tabular forms with invalid characters in the PageNames? That would require an additional fix. Any ideas?&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nextequalzero.com/2007/09/error-when-sending-to-microsoft-excel/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
