Breakpoint

Date and time of this article Monday, October 03, 2011

Breakpoint keyword is handy

In some code on Form Controls the debugger isn't invoked when you place a breakpoint ( control F9 ). This is a well known bug in Axapta which can be nicely worked around with the breakpoint keyword.

Just write breakpoint on the place where ......more......

Debug

Date and time of this article Monday, October 03, 2011


......more......

Stopwatch

Date and time of this article Saturday, September 24, 2011

Stopwatch is a litle class in the Diagostics namespace wich is very handy for detecting the bottlenecks in time consuming processes.

Get the elapsed time..

Normally I measured the elapsed time with something like this:

            DateTime start = DateTime.Now;
            // Do some processing
            DateTime end = DateTime.Now;
            TimeSpan elap    ......more......

Diagnostics

Date and time of this article Saturday, September 24, 2011

The System.Diagnostics namespace provides classes with allows you to interact with the system.

Some of these classes:

  • Eventlog provides the functionality to read and write to the eventlog.
  • Process provides functionality to start, stop en monitor the processes on the system and the network.
  • PerformanceCounter ......more......

Predicate

Date and time of this article Thursday, September 01, 2011

A predicate is a method that defines a set of criterias and can be used as a parameter

test

The .where extension method accepts a lambda expression as parameter. This parameter is called a predicate but in fact is a Expression.

If you want to use this in your own class you need to define the predicate like this:

......more......

AsParallel

Date and time of this article Thursday, August 25, 2011

AsParellel extionsion will process your query in parallel over multiple cores

 

AsParellel extionsion will process your query in parallel over multiple cores.

The use of the AsParallel extension is that eays that you tend to use the AsParallel extension for every query you write ......more......

Modulus operator

Date and time of this article Monday, August 22, 2011

Use the modulus operator to check the last digit

The modulus operator is useful for checking the last digit of your number.

Checking numbers which ends with five:

if( number % 5 ==0)
{
   // number ends with five
}

Or detecting odd or even numbers, lik ......more......

Instance from string

Date and time of this article Tuesday, August 16, 2011

Using reflection to create an instance from string

Using reflection to create an instance from a string is pretty straightforward:

Type new Type = Type.GetType("Namespace.Location.ClassName, AssemblyName", true);

Very nice to use in combination with generic classes, ......more......

Virtual mode

Date and time of this article Sunday, July 10, 2011

The Virtual Mode property of the DataGridView allows us to work with huge amounts of data

The Virtual Mode property of the DataGridView allows us to work with huge amounts of data. By setting this property, and some custom code, the DataGridView is loading it's data just in time and that's exactly what we want.

First you ......more......

DataGridView

Date and time of this article Sunday, July 10, 2011


......more......

Tags of this article ,

Display method

Date and time of this article Monday, July 04, 2011

Use display methods to show data wich is not in your datasource

You can use display methods to show data on your report or form to show data which is not in your datasource.

You can put your display methods in your form or report but if you are going to use the same method more then once it's bet ......more......

Fetch

Date and time of this article Monday, July 04, 2011

Reports fetch method

It's possible to override the fecth method of the Report. The fetch method catches all the data so if you have to some calculation or expressions wich can't be handled in the query this is your location.

In the fetch method you can ......more......

Programmable Section

Date and time of this article Monday, July 04, 2011

Axapta programmable section

The programmable section is used for displaying custom content. If you have to use display methods then it's the idea to create a programmable section and display these values in it.

Default the programmable section is not visible on ......more......

Dialog

Date and time of this article Monday, June 20, 2011

Showing Dialog Forms in Axapta

Dialog is a class in Axapta which you can use to show simple Dialogs.
In my case I needed a class which could be started from a menu-items and then shows the dialog.

First declare the necessary variables:

cl    ......more......

Order of commands

Date and time of this article Monday, June 20, 2011

The SQL commands have to used in a specific order

The SQL commands of T-SQL have to be used in a specified order.

1 Select
2 From
3 Where
4 Group By
5 Having
6 Where
7 Order By

Saw somewhere a nice mnemonic for this:

......more......

Commands

Date and time of this article Monday, June 20, 2011

Everything about SQL commands (t-sql)

......more......

Rebuild indexes

Date and time of this article Thursday, June 16, 2011

When to rebuild indexes in SQL-Server

Sometimes a table with the right indexes is still not performing like expected. At this moment you have to check the fragmentation of the indexes of the table.

If the fragmentation off the index is more than 30 it's recomended to re ......more......

Default values

Date and time of this article Friday, June 10, 2011

A way to implement default values.

An easy and simple way to implement default values in Entity Framework is to override the SaveChanges Event from the datacontext object.

In order to override the SaveChanges event you have to create the additional partial class ......more......

Generic Repository

Date and time of this article Tuesday, May 31, 2011

Entity framework generic repository

A generic repository class is a class with generic CRUD methods wich can handle your CRUD methods for all you Entity's.Well almost then.

Untill now I have this:

public class Repository<Trepository> where Treposito    ......more......

XMLserializer

Date and time of this article Monday, May 30, 2011

XMLserializer to serialize lists of Entities

It can be useful to serialize lists of Entity's to XML. In my case, for instance, the list with entity's are send to a Biztalk-server which is going to process it.

Example: serialize List<> to XML:

            Xml    ......more......

Updating colums in multiple rows

Date and time of this article Tuesday, May 10, 2011

Update columns in multiple rows with variable row-name

There is a grid which shows all the rows of the entity table. On top of that a screen with a combobox in which all the colums of the entity is shown and next to that a textbox for the new value of these colums.

On button_click we wa ......more......

Initialisation

Date and time of this article Tuesday, April 26, 2011

Axapta Reports initialisation

Axapta reports:

The reports class is derived from RunbaseReport.

From there these methods are called:

  • Init: upon activation of the report 
  • Run: after the init mehtod has been executed
  • ......more......

Reports

Date and time of this article Tuesday, April 26, 2011


......more......

Tags of this article ,

Common

Date and time of this article Friday, April 22, 2011

Axapta common type

Common is the base type for the axapta tables.

Example:
When you pass an unkown table to a function and need to define which is:

public static TaxGroup resolveTaxGroup(Common aTable)
{
    CustTable            ......more......

Method sequence

Date and time of this article Friday, April 22, 2011

Axapta table method sequence

When the end user...

This sequence of table methods is called...

runs a form which is using a table as a data source.

HelpField

......more......