Microsoft Dynamics Ax developer's blog

Tuesday, January 29, 2008

Brainbench results





Brainbench is a site dedicated for online testing. There are some free tests which I have done some time ago. My transcript id is 6941773

Wednesday, January 23, 2008

Tweaking google desktop gadgets

Google Desktop has a calendar gadget. But it use american style: week begins with sunday and there are only english letters in title. Here in Russia week starts with monday. So I was interested to localize that gadget. And it was easy. SDK contains designer and good examples, and gadgets are only combination of XML and javascript, so they can be hacked by anyone who knows that technologies. If you are interested in localizing that gadget to your language, or have any ideas of integrating google desktop gadget technology with Ax - just reply to this post.



download this gadget

Thursday, January 17, 2008

Trace Parser small bug

Trace Parser is a new tool for profiling Dynamics Ax code. Unlike profiler, which makes execution of the code about 30 times slower, TraceParser takes extremely low resources - 4% according to Alexey Eremenko blog)

But since it is in the "beta" stage, there are some problems with usability and stability.

For example, when I run the "trace summary" menu item on my trace I've got an exception. It seems (thanks to reflector) the cause is in SqlTimeBreakDown function in SQL server Trace Parser database.

When I add condition to exclude division by zero, it results in empty
grid instead of exception.

This is the fix:

if @SQLTime>0  -- <<<<<<<<<<<<<<<< the fix
begin
INSERT INTO @BreakdownInformation
SELECT (sum(PrepDuration) * 100)/@SQLTime [% of time in SQL Prep],(
sum(BindDuration) * 100)/@SQLTime [% of time in SQL Bind],
(sum(RowFetchDuration) * 100)/@SQLTime [% of time in SQL Row Fetch],
(sum(ExecuteDuration) * 100)/@SQLTime [% of time in SQL Execution]
from SqlQueryInstance
WHERE traceId = @Traceid AND sessionid = @sessionid
end -- <<<<<<<<<<<<<<<< the fix
RETURN

Wednesday, January 16, 2008

Syntax highlighting of X++ code in your blog or site

1. Download highlight.js archive
2. Unpack archive and place it on your site
3. Аdd the following lines at start your html

<script type="text/javascript" src="highlight.js"></script>
<script type="text/javascript">
initHighlightingOnLoad('axapta');
</script>


(or, add html/javascript block with that content in the blogger.com template editor. If you use blogger, you should replace path to the script with full path to site where you uploaded the script like "http://belugin.info/highlight.js")

4. Attach the sample.css stylesheet to your page or add it's contents to the "style" tag of your blogger template

5. Post your code snippets like this:

<pre><code class="Axapta">
// your code here
</code></pre>


PS. You can also use export.html from the archive and skip all steps except 4 - just paste a generated code to your page