<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Florian's weblog</title><subtitle type="html">My first experience with Microsoft Dynamics AX, BC.Net and the Enterprise Portal.</subtitle><id>http://blogs.msdn.com/floditt/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/floditt/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/floditt/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2009-01-29T14:55:00Z</updated><entry><title>Memory leaks and profiling with .Net</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/floditt/archive/2009/11/04/memory-leaks-and-profiling-with-net.aspx" /><id>http://blogs.msdn.com/floditt/archive/2009/11/04/memory-leaks-and-profiling-with-net.aspx</id><published>2009-11-04T21:48:00Z</published><updated>2009-11-04T21:48:00Z</updated><content type="html">&lt;P&gt;I wrote some moths ago &lt;A href="http://blogs.msdn.com/floditt/archive/2008/12/15/1-the-garbage-collector-in-x-and-the-clr.aspx" mce_href="http://blogs.msdn.com/floditt/archive/2008/12/15/1-the-garbage-collector-in-x-and-the-clr.aspx"&gt;an article about the GC&lt;/A&gt; and highlighted some particularities (unsafe and unmanaged code, disposing and finalizing, etc). &lt;/P&gt;
&lt;P&gt;When you are developing with .Net you will be sometimes faced to memory or resource&amp;nbsp;leaks. Especially if you are using the BC.Net, since the BC.Net is using unsafe and unmanaged code. But even&amp;nbsp;with X++ you&amp;nbsp;will be&amp;nbsp;more and more faced to such problems.&amp;nbsp;So it is very useful to know as much as possible about causes, identification and resolving. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://weblogs.asp.net/fmarguerie/" mce_href="http://weblogs.asp.net/fmarguerie/"&gt;Fabrice Marguerie&lt;/A&gt; (co-author of &lt;A href="http://linqinaction.net/" mce_href="http://linqinaction.net/"&gt;LINQ in Action&lt;/A&gt;) wrote a &lt;A href="http://msdn.microsoft.com/en-us/library/ee658248.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ee658248.aspx"&gt;great article&lt;/A&gt; on MSDN (&lt;A href="http://weblogs.asp.net/fmarguerie/archive/2009/11/03/article-detect-avoid-memory-leaks.aspx" mce_href="http://weblogs.asp.net/fmarguerie/archive/2009/11/03/article-detect-avoid-memory-leaks.aspx"&gt;his blog entry&lt;/A&gt; for the trackback) about this subject. Enjoy this article!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9917568" width="1" height="1"&gt;</content><author><name>floditt</name><uri>http://blogs.msdn.com/members/floditt.aspx</uri></author><category term="C#" scheme="http://blogs.msdn.com/floditt/archive/tags/C_2300_/default.aspx" /><category term="BC.Net" scheme="http://blogs.msdn.com/floditt/archive/tags/BC.Net/default.aspx" /><category term="Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Troubleshooting/default.aspx" /><category term="Programming" scheme="http://blogs.msdn.com/floditt/archive/tags/Programming/default.aspx" /><category term="Thoughts" scheme="http://blogs.msdn.com/floditt/archive/tags/Thoughts/default.aspx" /><category term="The CLR for X++ programmers " scheme="http://blogs.msdn.com/floditt/archive/tags/The+CLR+for+X_2B002B00_+programmers+/default.aspx" /></entry><entry><title>IDynamicsAXExpressionBuilder returned error code 0x80131509 - reloaded</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/floditt/archive/2009/08/20/idynamicsaxexpressionbuilder-returned-error-code-0x80131509-reloaded.aspx" /><id>http://blogs.msdn.com/floditt/archive/2009/08/20/idynamicsaxexpressionbuilder-returned-error-code-0x80131509-reloaded.aspx</id><published>2009-08-20T12:21:12Z</published><updated>2009-08-20T12:21:12Z</updated><content type="html">&lt;p&gt;As I already wrote it in the update of that blog entry in &lt;a href="http://blogs.msdn.com/floditt/archive/2009/05/05/idynamicsaxexpressionbuilder-returned-error-code-0x80131509.aspx"&gt;my first posing&lt;/a&gt; about this issue:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The origin of this issue can be found in the method '&lt;a href="http://msdn.microsoft.com/en-us/library/cc615095.aspx"&gt;buildEnumerationXml&lt;/a&gt;' of the class '&lt;a href="http://msdn.microsoft.com/en-us/library/cc642449.aspx"&gt;SysExpression&lt;/a&gt;':&lt;/p&gt;    &lt;p&gt;Currently, a loop iterates until the last element: &lt;/p&gt;    &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;for&lt;/span&gt; (i = sysDictEnum.firstValue(); i &amp;lt;= sysDictEnum.lastValue(); i = sysDictEnum.nextValue(i)) &lt;/pre&gt;
  &lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

  &lt;p&gt;I you replace this (sysDictEnum.lastValue(); ) by the number of elements (sysDictEnum.values();) the issue is solved. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;[UPDATE 03/09/2009]&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The hotfix for this bug has been published: KB974925 (Build: 5.0.1500.1255).&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9876665" width="1" height="1"&gt;</content><author><name>floditt</name><uri>http://blogs.msdn.com/members/floditt.aspx</uri></author></entry><entry><title>Importing Leads and Contacts</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/floditt/archive/2009/08/19/importing-leads-and-contacts.aspx" /><id>http://blogs.msdn.com/floditt/archive/2009/08/19/importing-leads-and-contacts.aspx</id><published>2009-08-19T01:11:00Z</published><updated>2009-08-19T01:11:00Z</updated><content type="html">&lt;P&gt;You can find a very good description on &lt;A href="http://blogs.msdn.com/emeadaxsupport" mce_href="http://blogs.msdn.com/emeadaxsupport"&gt;our team&amp;nbsp;blog&lt;/A&gt; (EMEA Dynamics AX Support) how to import leads and contact Xml files with Dynamics Ax 2009 &lt;A href="http://blogs.msdn.com/emeadaxsupport/archive/2009/04/23/how-to-import-crm-leads.aspx" mce_href="http://blogs.msdn.com/emeadaxsupport/archive/2009/04/23/how-to-import-crm-leads.aspx"&gt;here&lt;/A&gt;. The problem you will be faced by using this is, that you can’t import data with non Ascii characters, which might cause some difficulties. The reason for that is the way how the Xml files is proceeded during the transformation process. &lt;/P&gt;
&lt;P&gt;Ax creates first a copy of the Xml file and the Xslt File in the temp directory of the AOS which is by default:&lt;/P&gt;
&lt;P&gt;C:\Program Files\Microsoft Dynamics AX\50\Application\appl\DynamicsAx1\tmp\ &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Unfortunately this is done by reading out the Xml file into a container and then creating a new Xml file by using the method:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc639240.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc639240.aspx"&gt;SysImportUtil&lt;/A&gt;/&lt;A href="http://msdn.microsoft.com/en-us/library/cc557405.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc557405.aspx"&gt;createFileFromContainer&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Unfortunately because it is using the &lt;A href="http://msdn.microsoft.com/en-us/library/aa867230.aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa867230.aspx"&gt;AsciiIo&lt;/A&gt; to create the file. Since this class is intended to encode the content of the container into Ascii, it is&amp;nbsp; incompatible with Xml files. The sample files are using Xml files encoded in &lt;A href="http://en.wikipedia.org/wiki/UTF-8" mce_href="http://en.wikipedia.org/wiki/UTF-8"&gt;Utf-8&lt;/A&gt; which is some kind of an extension to Ascii and this is the reason why you can’t use this import for non Ascii characters:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;[..] &lt;CODE&gt;AsciiIO&lt;/CODE&gt; supports only &lt;A href="http://en.wikipedia.org/wiki/ANSI" mce_href="http://en.wikipedia.org/wiki/ANSI"&gt;ANSI&lt;/A&gt; &lt;U&gt;c&lt;/U&gt;ode &lt;U&gt;p&lt;/U&gt;age (ACP) characters. &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;But you can fix this by replacing the AsciiIo by the &lt;A href="http://msdn.microsoft.com/en-us/library/aa603840.aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa603840.aspx"&gt;TextIo&lt;/A&gt; class. Msdn&amp;nbsp;describes it&amp;nbsp;as follow:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;CODE&gt;TextIO&lt;/CODE&gt; replaces &lt;CODE&gt;AsciiIO&lt;/CODE&gt; to provide support for non-ANSI code page file I/O. The &lt;A href="http://msdn.microsoft.com/en-us/library/aa881745.aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa881745.aspx"&gt;&lt;CODE&gt;TextIO&lt;/CODE&gt; constructor &lt;/A&gt;has an additional optional parameter to set the code page of the file. &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is exactly what we need. The most common &lt;A href="http://en.wikipedia.org/wiki/Code_page" mce_href="http://en.wikipedia.org/wiki/Code_page"&gt;codepages&lt;/A&gt;&amp;nbsp;are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;0 - CP_ACP; the ANSI code page &lt;/LI&gt;
&lt;LI&gt;437 - OEM code page 437 &lt;/LI&gt;
&lt;LI&gt;850 - Code page 850 &lt;/LI&gt;
&lt;LI&gt;1200 - UTF-16&lt;A href="http://en.wikipedia.org/wiki/Endianness" mce_href="http://en.wikipedia.org/wiki/Endianness"&gt;LE&lt;/A&gt; (default value)&lt;/LI&gt;
&lt;LI&gt;1201 - UTF-16&lt;A href="http://en.wikipedia.org/wiki/Endianness" mce_href="http://en.wikipedia.org/wiki/Endianness"&gt;BE&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;65001 - UTF-8 &lt;/LI&gt;
&lt;LI&gt;54936: GB-18030 &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;So, if you want to use the Xml-files &lt;A href="http://blogs.msdn.com/emeadaxsupport/attachment/9564568.ashx" mce_href="http://blogs.msdn.com/emeadaxsupport/attachment/9564568.ashx"&gt;from the example&lt;/A&gt; without any modification you need to change the codepage to 65001, but it is easier to change the Xml-file to &lt;A href="http://en.wikipedia.org/wiki/UTF-16" mce_href="http://en.wikipedia.org/wiki/UTF-16"&gt;Utf-16&lt;/A&gt;.&amp;nbsp;This can be done&amp;nbsp;easily by using Visual Studio:&lt;/P&gt;
&lt;P&gt;Just open the Xml-file, change the Utf-8 to Utf-16 and safe the changes. Why not using the notepad ?&lt;/P&gt;
&lt;P&gt;Visual Studio reads out the Xml encoding information:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN class=html&gt;xml&lt;/SPAN&gt; &lt;SPAN class=attr&gt;version&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="1.0"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;encoding&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="utf-16"&lt;/SPAN&gt;?&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; WIDTH: 100%
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;
and adds the required file signature to that file (called &lt;A href="http://en.wikipedia.org/wiki/Byte_Order_Mark" mce_href="http://en.wikipedia.org/wiki/Byte_Order_Mark"&gt;BOM&lt;/A&gt;). These information can be&amp;nbsp;consulted with the Visual Studio&amp;nbsp;binary editor (File/Open/File/&amp;lt;select Xml-file&amp;gt;/Open as/binary editor):&amp;nbsp;“EF BB BF” for Utf-8 and “FF FE” for Utf-16.&lt;/P&gt;
&lt;P&gt;So in order to import data with non-Ascii data, you have to:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;replace the AsciiIo class by TextIo &lt;/LI&gt;
&lt;LI&gt;import Utf-16 encoded Xml data. &lt;/LI&gt;&lt;/OL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9874654" width="1" height="1"&gt;</content><author><name>floditt</name><uri>http://blogs.msdn.com/members/floditt.aspx</uri></author><category term="X++" scheme="http://blogs.msdn.com/floditt/archive/tags/X_2B002B00_/default.aspx" /><category term="AIF " scheme="http://blogs.msdn.com/floditt/archive/tags/AIF+/default.aspx" /><category term="Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Troubleshooting/default.aspx" /><category term="Programming" scheme="http://blogs.msdn.com/floditt/archive/tags/Programming/default.aspx" /><category term="Thoughts" scheme="http://blogs.msdn.com/floditt/archive/tags/Thoughts/default.aspx" /><category term="Ax-Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax-Troubleshooting/default.aspx" /></entry><entry><title>Template Wizard does create SheetNames with more than 30 characters</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/floditt/archive/2009/08/18/template-wizard-does-create-sheetnames-with-more-than-30-characters.aspx" /><id>http://blogs.msdn.com/floditt/archive/2009/08/18/template-wizard-does-create-sheetnames-with-more-than-30-characters.aspx</id><published>2009-08-18T22:14:53Z</published><updated>2009-08-18T22:14:53Z</updated><content type="html">&lt;p&gt;The Template Wizard (Administration/Periodic/Data export/import/Excel spreadsheets/Template Wizard) creates unfortunately SheetNames that might exceed 30 characters, which is not allowed by Excel and results in annoying message boxes that are requesting a new SheetName with less than 31 characters. &lt;/p&gt;  &lt;p&gt;The following code change in the method &lt;a href="http://msdn.microsoft.com/en-us/library/aa575181.aspx"&gt;SysDataExcelDef&lt;/a&gt;/&lt;a href="http://msdn.microsoft.com/en-us/library/aa638285.aspx"&gt;buildTmpExcelWorksheet&lt;/a&gt; will resolve this problem:&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;        &lt;span class="rem"&gt;//modifications done for working with long tablenames&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;        &lt;span class="rem"&gt;//    str tempSheetName;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;        &lt;span class="rem"&gt;//    str suffixName;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;        &lt;span class="rem"&gt;//    int suffixlength;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;        &lt;span class="rem"&gt;//original code:&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        &lt;span class="rem"&gt;//tmpExcelWorksheet.SheetName = tmpExcelWorksheet.TableName + '_' + int2str(sysExpImpTable.OccurrenceId) + '-1';&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;        &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;        tempSheetName = tmpExcelWorksheet.TableName + &lt;span class="str"&gt;'_'&lt;/span&gt; + int2str(sysExpImpTable.OccurrenceId) + &lt;span class="str"&gt;'-1'&lt;/span&gt;;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt; (strlen(tempSheetName) &amp;gt; 30)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;        {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;            tempSheetName = tmpExcelWorksheet.TableName;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;            suffixName =  &lt;span class="str"&gt;'_'&lt;/span&gt; + int2str(sysExpImpTable.OccurrenceId) + &lt;span class="str"&gt;'-1'&lt;/span&gt;; &lt;span class="rem"&gt;//as this is done in the original code&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;            suffixLength = strlen(suffixName);&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;            tempSheetName = substr(tempSheetName, 0, 30 - suffixLength);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;            &lt;span class="rem"&gt;//assigning the new name&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;            tmpExcelWorksheet.SheetName = tempSheetName + suffixName;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;        }&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;        &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;        {&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;            tmpExcelWorksheet.SheetName = tempSheetName;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;        }&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9874427" width="1" height="1"&gt;</content><author><name>floditt</name><uri>http://blogs.msdn.com/members/floditt.aspx</uri></author><category term="X++" scheme="http://blogs.msdn.com/floditt/archive/tags/X_2B002B00_/default.aspx" /><category term="Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Troubleshooting/default.aspx" /><category term="Ax2009" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax2009/default.aspx" /><category term="Ax-Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax-Troubleshooting/default.aspx" /></entry><entry><title>Large Xml-documents with an AIF-WebService.</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/floditt/archive/2009/08/11/large-xml-documents-with-an-aif-webservice.aspx" /><id>http://blogs.msdn.com/floditt/archive/2009/08/11/large-xml-documents-with-an-aif-webservice.aspx</id><published>2009-08-11T12:48:00Z</published><updated>2009-08-11T12:48:00Z</updated><content type="html">If you are faced to 'large' Xml-documents with AIF-WebServices, you might be faced to difficulties for Inbound and OutBound services. The following two points should be applied for the client app.config, if the client uses the WCF for communicating with the AIF-WebService (Inbound-Services - you are sending large Xml-Documents to the AIF-WebService), and on the server web.config (Outbound-Services - you are receiving large Xml-documents from the WebService) 1) Changing the web.config by adding the...(&lt;a href="http://blogs.msdn.com/floditt/archive/2009/08/11/large-xml-documents-with-an-aif-webservice.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9864098" width="1" height="1"&gt;</content><author><name>floditt</name><uri>http://blogs.msdn.com/members/floditt.aspx</uri></author><category term="AIF " scheme="http://blogs.msdn.com/floditt/archive/tags/AIF+/default.aspx" /><category term="Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Troubleshooting/default.aspx" /><category term="Ax2009" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax2009/default.aspx" /><category term="Ax-Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax-Troubleshooting/default.aspx" /></entry><entry><title>‘0’-values don’t appear in Xml files generated by the AIF</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/floditt/archive/2009/08/11/0-values-don-t-appear-in-xml-files-generated-by-the-aif.aspx" /><id>http://blogs.msdn.com/floditt/archive/2009/08/11/0-values-don-t-appear-in-xml-files-generated-by-the-aif.aspx</id><published>2009-08-11T11:57:21Z</published><updated>2009-08-11T11:57:21Z</updated><content type="html">Numeric values that are 0 (not null) are not serialized and don't appear in the Xml file. The reason for this is, that the numeric types in Dynamics Ax are not nullable (must have a value) and do interpret the value 0 as a &amp;quot;null value&amp;quot; (0 as a ‘ magic number ’) during the serialization. The only possibility is to declare these columns as mandatory, so that they are serialized even with 0 as value. Another way is to inform the consumer application (which might be BizTalk) that non mentioned...(&lt;a href="http://blogs.msdn.com/floditt/archive/2009/08/11/0-values-don-t-appear-in-xml-files-generated-by-the-aif.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9864053" width="1" height="1"&gt;</content><author><name>floditt</name><uri>http://blogs.msdn.com/members/floditt.aspx</uri></author><category term="AIF " scheme="http://blogs.msdn.com/floditt/archive/tags/AIF+/default.aspx" /><category term="Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Troubleshooting/default.aspx" /><category term="Ax2009" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax2009/default.aspx" /><category term="Ax-Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax-Troubleshooting/default.aspx" /></entry><entry><title>AIF-service call with COM and .Net Business Connector</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/floditt/archive/2009/08/11/aif-service-call-with-com-business-connector.aspx" /><id>http://blogs.msdn.com/floditt/archive/2009/08/11/aif-service-call-with-com-business-connector.aspx</id><published>2009-08-11T11:48:46Z</published><updated>2009-08-11T11:48:46Z</updated><content type="html">When executing an AIF-service with the COM and .Net Business Connector the client will not be notified about exceptions during the execution. The reason for this is, that AIF-services are always executed within a transaction ( ttslevel = 1) even when no ttsBegin has been executed. And as described on the X++ blog , exceptions are not caught within the transaction (sample is taken from the X++ blog): 1: try 2: { 3: MyTableType t; 4: ttsBegin; // Start a transaction 5: try 6: { 7: throw error(“Something...(&lt;a href="http://blogs.msdn.com/floditt/archive/2009/08/11/aif-service-call-with-com-business-connector.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9864043" width="1" height="1"&gt;</content><author><name>floditt</name><uri>http://blogs.msdn.com/members/floditt.aspx</uri></author><category term="X++" scheme="http://blogs.msdn.com/floditt/archive/tags/X_2B002B00_/default.aspx" /><category term="AIF " scheme="http://blogs.msdn.com/floditt/archive/tags/AIF+/default.aspx" /><category term="Thoughts" scheme="http://blogs.msdn.com/floditt/archive/tags/Thoughts/default.aspx" /><category term="Ax2009" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax2009/default.aspx" /></entry><entry><title>Request for the permission of type 'SecurityPermission' failed</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/floditt/archive/2009/08/10/request-for-the-permission-of-type-securitypermission-failed.aspx" /><id>http://blogs.msdn.com/floditt/archive/2009/08/10/request-for-the-permission-of-type-securitypermission-failed.aspx</id><published>2009-08-10T20:49:00Z</published><updated>2009-08-10T20:49:00Z</updated><content type="html">When you get the following exception while executing a report on the SSRS or within Ax: System.Security.SecurityException was unhandled Message=&amp;quot; Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.” this is probably because the permission set in the config file of the SSRS - which you can normally find here (SQL 2005): C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer...(&lt;a href="http://blogs.msdn.com/floditt/archive/2009/08/10/request-for-the-permission-of-type-securitypermission-failed.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9863395" width="1" height="1"&gt;</content><author><name>floditt</name><uri>http://blogs.msdn.com/members/floditt.aspx</uri></author><category term="Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Troubleshooting/default.aspx" /><category term="Ax2009" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax2009/default.aspx" /><category term="Ax-Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax-Troubleshooting/default.aspx" /></entry><entry><title>base64Encode() of the kernel class ‘Image’ does return an empty string</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/floditt/archive/2009/08/10/base64encode-of-the-kernel-class-image-does-return-an-empty-string.aspx" /><id>http://blogs.msdn.com/floditt/archive/2009/08/10/base64encode-of-the-kernel-class-image-does-return-an-empty-string.aspx</id><published>2009-08-10T18:32:24Z</published><updated>2009-08-10T18:32:24Z</updated><content type="html">A partner asked me why the base64Encode method of the Image class does always return an empty string. In the following example: 1: Image image; 2: str sBase64Encode; 3: ; 4: image = new Image(); 5: image.loadImage(@ 'C:\sample.bmp' ); 6: &amp;#160; 7: sBase64Encode = image.base64Encode(); 8: info(sBase64Encode); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin:...(&lt;a href="http://blogs.msdn.com/floditt/archive/2009/08/10/base64encode-of-the-kernel-class-image-does-return-an-empty-string.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9863268" width="1" height="1"&gt;</content><author><name>floditt</name><uri>http://blogs.msdn.com/members/floditt.aspx</uri></author><category term="X++" scheme="http://blogs.msdn.com/floditt/archive/tags/X_2B002B00_/default.aspx" /><category term="Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Troubleshooting/default.aspx" /><category term="AxToolbox" scheme="http://blogs.msdn.com/floditt/archive/tags/AxToolbox/default.aspx" /><category term="Ax4" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax4/default.aspx" /><category term="Ax2009" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax2009/default.aspx" /></entry><entry><title>Gender information in Employees-form and the Global Address Book (GAB)</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/floditt/archive/2009/08/10/gender-information-in-employees-form-and-the-global-address-book-gab.aspx" /><id>http://blogs.msdn.com/floditt/archive/2009/08/10/gender-information-in-employees-form-and-the-global-address-book-gab.aspx</id><published>2009-08-10T12:47:00Z</published><updated>2009-08-10T12:47:00Z</updated><content type="html">You can open the information about employees with the Global Address Book (Basic/Global Address Book) and with the Employees form (Basic/Employees). Normally it is no problem to modify data in both forms, but unfortunately this is not true for the ‘gender’ property . This information is stored in the DirPersonPartyDetail ( Gender ) and EmplTable (EmplGender) table. The particularity here is, that the EmplGender property is of type ‘ EmplGender ’ which has two states (0:Male;1:Female) and the enum...(&lt;a href="http://blogs.msdn.com/floditt/archive/2009/08/10/gender-information-in-employees-form-and-the-global-address-book-gab.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9863062" width="1" height="1"&gt;</content><author><name>floditt</name><uri>http://blogs.msdn.com/members/floditt.aspx</uri></author><category term="X++" scheme="http://blogs.msdn.com/floditt/archive/tags/X_2B002B00_/default.aspx" /><category term="Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Troubleshooting/default.aspx" /><category term="Ax2009" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax2009/default.aspx" /><category term="Ax-Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax-Troubleshooting/default.aspx" /></entry><entry><title>IDynamicsAXExpressionBuilder returned error code 0x80131509</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/floditt/archive/2009/05/05/idynamicsaxexpressionbuilder-returned-error-code-0x80131509.aspx" /><id>http://blogs.msdn.com/floditt/archive/2009/05/05/idynamicsaxexpressionbuilder-returned-error-code-0x80131509.aspx</id><published>2009-05-05T18:05:00Z</published><updated>2009-05-05T18:05:00Z</updated><content type="html">In forms that are using the ActiveX-control ExpressionBuilder (like TrvPolicyForm) you might be faced to the following error message: Method 'initialize' in COM object of class 'IDynamicsAXExpressionBuilder' returned error code 0x80131509 (&amp;lt;unknown&amp;gt;) which means: End enum not found. This is caused by an enumerator that is used by the ActiveX-control . The method "initialize" of that ActiveX-control requires in its first parameter the expression in a Xml-document. That Xml-document contains...(&lt;a href="http://blogs.msdn.com/floditt/archive/2009/05/05/idynamicsaxexpressionbuilder-returned-error-code-0x80131509.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9588996" width="1" height="1"&gt;</content><author><name>floditt</name><uri>http://blogs.msdn.com/members/floditt.aspx</uri></author><category term="Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Troubleshooting/default.aspx" /><category term="Ax2009" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax2009/default.aspx" /></entry><entry><title>Webcast: .Net for X++ programmers</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/floditt/archive/2009/03/19/webcast-net-for-x-programmers.aspx" /><id>http://blogs.msdn.com/floditt/archive/2009/03/19/webcast-net-for-x-programmers.aspx</id><published>2009-03-19T20:32:00Z</published><updated>2009-03-19T20:32:00Z</updated><content type="html">I will do a short Webcast about .Net basics for X++ developers which is based on the articles I posted here recently. During 1 hour I’ll talk about the basics of .Net and how to do’s. If you are a X++ programmer and you are new to .Net, this Webcast might interest you. The Webcast take place on Tuesday April 2nd 2009 at 16:00 GMT+1. Update: I'll publish the registration link as soon as it will be available. This should be done in the next few days. Update: Here are the missing information: Course...(&lt;a href="http://blogs.msdn.com/floditt/archive/2009/03/19/webcast-net-for-x-programmers.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9490629" width="1" height="1"&gt;</content><author><name>floditt</name><uri>http://blogs.msdn.com/members/floditt.aspx</uri></author><category term="Fun" scheme="http://blogs.msdn.com/floditt/archive/tags/Fun/default.aspx" /><category term="The CLR for X++ programmers " scheme="http://blogs.msdn.com/floditt/archive/tags/The+CLR+for+X_2B002B00_+programmers+/default.aspx" /></entry><entry><title>Some links to IIS 7 information</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/floditt/archive/2009/03/03/some-links-to-iis-7-information.aspx" /><id>http://blogs.msdn.com/floditt/archive/2009/03/03/some-links-to-iis-7-information.aspx</id><published>2009-03-03T13:28:00Z</published><updated>2009-03-03T13:28:00Z</updated><content type="html">IIS 7 changed fundamentally since IIS 6. Here are some links that might help you when you feel lost with all these changes ;-) IIS 7 Links: http://technet.microsoft.com/en-us/library/cc732976.aspx ( IIS 7.0: Operations Gui de) http://www.iis.net/ConfigReference ( IIS 7.0 Configuration Reference ) http://www.iis.net/getstarted IIS 7 breaking changes: http://mvolo.com/blogs/serverside/archive/2007/12/08/IIS-7.0-Breaking-Changes-ASP.NET-2.0-applications-Integrated-mode.aspx IIS 7 configuration: http://mvolo.com/blogs/serverside/archive/2007/07/21/Anatomy-of-an-IIS7-configuration-path.aspx...(&lt;a href="http://blogs.msdn.com/floditt/archive/2009/03/03/some-links-to-iis-7-information.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9456400" width="1" height="1"&gt;</content><author><name>floditt</name><uri>http://blogs.msdn.com/members/floditt.aspx</uri></author><category term="EP" scheme="http://blogs.msdn.com/floditt/archive/tags/EP/default.aspx" /><category term="AIF " scheme="http://blogs.msdn.com/floditt/archive/tags/AIF+/default.aspx" /></entry><entry><title>Deploying service references with Dynamics Ax 2009</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/floditt/archive/2009/02/09/deploying-service-references-with-dynamics-ax-2009.aspx" /><id>http://blogs.msdn.com/floditt/archive/2009/02/09/deploying-service-references-with-dynamics-ax-2009.aspx</id><published>2009-02-09T16:46:12Z</published><updated>2009-02-09T16:46:12Z</updated><content type="html">Service references are are great feature in Dynamics Ax 2009 and using WCF with Ax is now really easy. But unfortunately it is not easy to deploy this service reference. If you now need to deploy a service reference from the development environment to the evaluation environment, or from the evaluation to the production environment, there is no functionality that will automate this. In order to keep all your modification, I would suggest the following procedure: Make a backup of the app.config of...(&lt;a href="http://blogs.msdn.com/floditt/archive/2009/02/09/deploying-service-references-with-dynamics-ax-2009.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9408669" width="1" height="1"&gt;</content><author><name>floditt</name><uri>http://blogs.msdn.com/members/floditt.aspx</uri></author><category term="AIF " scheme="http://blogs.msdn.com/floditt/archive/tags/AIF+/default.aspx" /><category term="Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Troubleshooting/default.aspx" /><category term="Ax2009" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax2009/default.aspx" /></entry><entry><title>RPC error 1702 when calling a WinAPI method from a batch job</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/floditt/archive/2009/01/29/rpc-error-1702-when-calling-a-winapi-method-from-a-batch-job.aspx" /><id>http://blogs.msdn.com/floditt/archive/2009/01/29/rpc-error-1702-when-calling-a-winapi-method-from-a-batch-job.aspx</id><published>2009-01-29T16:55:00Z</published><updated>2009-01-29T16:55:00Z</updated><content type="html">You probably already noticed that error messages are sometimes not really helpful when you are trying to understand a problem. The following code creates such misleading error message: 1: public void run() 2: { 3: ; 4: if (WinApi::folderExists( @"c:\temp\")) 5: info("Folder exists "); 6: else 7: info("Folder does not exists"); 8: } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/...(&lt;a href="http://blogs.msdn.com/floditt/archive/2009/01/29/rpc-error-1702-when-calling-a-winapi-method-from-a-batch-job.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9383121" width="1" height="1"&gt;</content><author><name>floditt</name><uri>http://blogs.msdn.com/members/floditt.aspx</uri></author><category term="C#" scheme="http://blogs.msdn.com/floditt/archive/tags/C_2300_/default.aspx" /><category term="X++" scheme="http://blogs.msdn.com/floditt/archive/tags/X_2B002B00_/default.aspx" /><category term="Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Troubleshooting/default.aspx" /><category term="Programming" scheme="http://blogs.msdn.com/floditt/archive/tags/Programming/default.aspx" /><category term="Ax4" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax4/default.aspx" /><category term="Ax2009" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax2009/default.aspx" /><category term="Ax-Troubleshooting" scheme="http://blogs.msdn.com/floditt/archive/tags/Ax-Troubleshooting/default.aspx" /></entry></feed>