Archive for May, 2009

Visual Studio 2010 and .NET Framework 4 Beta 1

Friday, May 22nd, 2009

Visual Studio 2010 Beta 1 is here!

Team Suite edition is available for download and can be obtained from Visual Studio 2010 Beta 1.

Also you can install new .NET Framework 4 Beta 1.

You can check out the new things this version has brought on Zander’s blog.

There are also walkthroughs available on MSDN so check them out too.

If you need a help installing VS2010 you can use this video guideline from Channel9.

Happy coding ;)

WPF Routed Events

Tuesday, May 19th, 2009

Windows Presentation Foundation (WPF) has brought, among other new and interesting things, a concept of routed events. So, what is so special about them?

Earlier, if you wanted to handle some sort of event, you needed to explicitly register for that event. When the event is raised, your handler is invoked. WPF uses a different approach.

All elements in WPF are organized in element trees (logical and visual). When a routed event is raised, it can travel up (so called bubbling) or down (tunneling) the visual and logical tree invoking handlers along the elements tree.

When a bubbling event is raised, the handler at the element source is invoked and the event is forwarded to its successive parents, all the way to the root of the element tree. Because of this, you handle an event on an element further up the element hierarchy from the source element. An example for a bubbling event would be the KeyDown event.

Tunneling events travel down the element tree. Event handlers at the element tree root are raised and the event is then forwarded to successive child elements until it reaches the source element. This allows upstream elements to intercept the event and handle it before the event reaches the source element. By convention they are named with the prefix Preview (e.g. PreviewKeyDown).

Direct event handling is also supported. This means that only explicitly registered event handlers will be invoked when the event is raised. The event does not travel up or down the element tree. This is the same as Windows Forms event-handling mechanism.

Input events are usually a pair of events, both the bubbling event and the tunneling event. For example, the KeyDown event and the PreviewKeyDown event are raised after a single user input action. First, the tunneling event is raised and travels its route. After that, the bubbling event is raised and travels its route. This allows listeners with handlers for the tunneling event to mark the routed event handled and thus stops the input bubbling events handler from invoking.

private void OnPreviewKeyDown(object sender, RoutedEventArgs e)

{

e.Handled = true;

}

But, there is a way to overcome this. What happens in background is that the event is routed anyway, just because of the Handled property set to true, handlers are not invoked. However, you can explicitly hook up event handlers with additional argument which states that handler will be invoked even if the event is marked as handled.

Elem.AddHandler(KeyDownEvent, new RoutedEventHandler(OnKeyDown), true);

How Fast Can You Do It? A Rapid Dynamics GP Cofiguration Wins a Garmin!

Thursday, May 14th, 2009

Here’s a contest from the Merit Matters Blog:

The Rapid Configuration Tool for Microsoft Dynamics GP quickly configures core application setup data to meet specific business needs. By using one of thirteen available industry templates, or a customized configuration template created in Microsoft Office Excel 2007, a new Microsoft Dynamics GP company can be configured easily within the intuitive user interface. Settings and data such as the chart of accounts, fiscal years, payment terms, shipping methods, taxes, core financial and distribution module setup, and more can be quickly set up using this tool.

This demo video takes a look at how fast the Rapid Configuration Tool can be used to configure a new Microsoft Dynamics GP company. Branislav Stojanovic, Senior Quality Analyst at Merit Solutions, shows us how to do it in 3 minutes. How fast can you do it?

Please continue reading at their blog for contest guidelines. Also, view a Case Study of a Rapid Dynamics GP Configuration – Mobile Life Ventures Goes Live with Dynamics GP in Two Weeks.

ADAM for Dynamics GP Web Services

Tuesday, May 12th, 2009

A Few days ago, I tried to install Dynamics GP web services. I thought that all of the prerequisites were satisfied (OS, ISO, IIS, ASP, etc) but when installation started I got an error:

ADAM Error – Error Code: 20038.The wizard could not access the registry. Error code: 0x800706fd. The trust relationship between this workstation and the primary domain failed.

I found some info on Internet that one person noticed that this error occurs when installation is run on computer which is joined to a domain. That was all…

What I did next was assign the computer on WORKGROUP and log in as local admin. After starting installation everything was just great. Installation was finished successfully!

Then I went back to WS Install Admin Guide and found interesting content about ADAM.

ADAM or Active Directory Application Mode is required by the Dynamics Security Service. In order to install Dynamics GP Web Services, the current user must be in ADAM administrator role. The user who installed Windows Server 2003 (in my case local admin) automatically is in this role. But if we want to enable some other users to install, update or modify GP Web services we should add them in this role.

Note: ADAM is related to Windows Server 2003 and ADMSL (Active Directory Lightweight Directory Services) is related to Windows Server 2008 and we have same situation for both.

For more details see Appendix A: ADAM or ADLDS Administrators in WS Install Admin Guide. You can find it here.

In short notes, to add new user in ADAM Administrator Role, follow next steps:

  • You must we logged as ADAM administrator.
  • Open All Programs->ADAM.
  • Create connection: Action-> Connect To and define connection string to server onto which GP Web services were installed. If the Web Services for Microsoft Dynamics GP installer has installed ADAM or the ADLDS instance, it will use the default port 389. If you’ve used a different port, specify that port value. Choose Configuration as the well-known naming context.
  • Click OK to connect.
  • Find ADAM installation and expand tree to find CN=Roles node.
  • In the list of roles, select Administrators. Choose Properties from the Action menu to display the properties for the Administrators role.
  • In the list of attributes for the Administrators role, locate and select “member”. Click Edit. The Multi-valued Distinguished Name with Security Principal Editor window will be displayed.
  • Click Add Windows Account to specify the user to add as an administrator.
  • Click OK to save your changes.
  • Click OK to close the Administrator role properties window and close ADSI Editor.

Processing Batch Jobs in Dynamics AX

Thursday, May 7th, 2009

The purpose of the Dynamics AX batch job system is to be able to run certain processes according to a predefined schedule or simply during off-peak hours. Many system forms including jobs and reports in Dynamics AX have a tab named Batch, where users can set up the process to execute as a batch job.

Because executing batch jobs can significantly impact the performance of a system, it is common practice in the Dynamics AX community to dedicate a physical server to this purpose, commonly designated as a batch server.

The most common problem with job processing is that users forget to attach a job to the batch group.
In order to process batch jobs you need the batch server running.

Goto Basic -> Inquries -> Batch -> Batch processing and select the batch group you want to process.

Your job must be attached to this group. Click OK and you will get your job running in the scheduled time.

Merit Solutions Featured on Channel 9 Website

Monday, May 4th, 2009

John O’Donnell, Microsoft Dynamics ISV Architect Evangelist, recently stopped by the Merit Solutions office to discuss our Microsoft Dynamics AX 2009 Snap In – the Vendors Journal.

In this video, John talks with Merit Solutions team members Bill Burke and Nenad Simeunovic and learned about our Microsoft Dynamics AX 2009 Snap In / Integration capabilities.

Product Demonstration starts at time index – 8:10.

View the video on Channel 9:
A Look at Snap-Ins for Microsoft Dynamics AX 2009 by Merit Solutions

Using Fields and Properties in Word 2007 Documents

Friday, May 1st, 2009

Microsoft Word provides an extensive list of properties available for user. However, every now and then there is a need for a special property, especially when fields are used. Or so I thought.
Actually, fields aren’t used that often as one who uses them could expect. Although almost everyone has at one point in time used fields (Total number of pages, current page – these are actually fields), most of the users aren’t aware of this.

How to insert a field in a document:

In order to insert a field in a document, follow these steps:

  1. Position the cursor at the place in document where you want to insert the field
  2. Go to Insert > Quick Parts > Fields
  3. Select from the list of available fields (left pane) and select one of their properties

Microsoft Office Word Fields

That’s it. This way you can insert Author property, Create Date, Date Saved, etc.

How to create a new property and use it as a fields.

However, I found on a couple of occasions that I cannot find the property I need. For example, I needed something like Customer, Project, Technology… things that simply weren’t there. What I did – I create custom properties and used them as fields. Here is how:

  1. Click Microsoft Office Button > Prepare > Properties
  2. Document Properties menu and window are displayed. From Document Properties menu, select Advanced Properties
  3. Click on Custom tab
  4. In the Name field, type the name of your custom property (Customer in this example)
  5. Select Text from the Type drop down list
  6. Type in Customer’s name in the Value field
  7. Click Add
    1. Microsoft Office Word Customer Field
      Note: If you later want to edit this property, Add button will change to Modify when you select the property from the list of properties and change the value. It will not be available until you change it.
  8. Now position the cursor at the place in document where you want to insert the field
  9. Go to Insert > Quick Parts > Fields
  10. Select from the list of available fields (left pane) DocProperty
  11. Locate Customer property in the right pane and select it. Click OK.

Microsoft Office Word Customer Field Codes

That’s it.

Note: Although Word automatically updates fields, it seems that custom properties have to be updated manually. In order to do this, just right click on the field and select Update Field
Keywords: Word 2007 Property fields custom tips tricks