Sunday, December 23, 2007

Holiday Wishes

Merry Christmas and A Happy New Year to you all!

Click below to view your Christmas Card:



If you can't view the greeting card, try installing the Adobe Flash Player 9 first.

Friday, December 21, 2007

21 and counting :)

It seems that I'm getting older everyday :) 21 years already passed away... Free champagne and candy for everyone :)



***



Sincerely,


Friday, December 14, 2007

Microsoft CRM Google Maps integration tool

I'm proud to present a very useful tool - MSCRM Google Maps - developed by Wolter Kreun, a friend of mine, a tool that managed to bring together two strenghts: Microsoft Dynamics CRM and Google Maps.
You can get a free sample from www.crmmaps.com and also see the latest news about it.
The beta version of the MSCRM Google Maps is available in 5 different languages: Russian (thanks to Evgeniy Yurevich), Spanish (thanks to Geraldo Luiz Yoshizawa), French (thanks to Samy Barmada), German (thanks to Jaksch Michael) and Romanian (thanks to Cornel Croitoriu).

Here are some sample movies:

1. Showing an map from the account entity
2. Showing one or more custom entities
3. Showing alle contacts in one map

We hope you'll find this tool useful and use the full version in your projects.

Sunday, December 02, 2007

Generating tooltips on certain events

A tooltip is a small box of explanatory text (usually on yellow background) that appears when the mouse pointer is held over a button or other interface element.
In Microsoft Dynamics CRM we can define constraints (masks) on certain fields. It is desired that the user is well informed about the text’s format, in real time, when triggering the onmousemove event on a certain field.
In this tutorial, we show you a function that generates tooltips on CRM’s forms, triggered by mouse events, such as: onclick, ondblclick, onmouseover, onmousedown and especially, onmousemove.

The links for this tutorial are:
English version --> click here
Romanian version --> click here

Here are some prints (examples) of different types and styles of tooltips made with the function presented in this tutorial:

Example 1:
Account Entity - Account Name - onmousemove event

Example 1
Example 2:
Account Entity - Primary Contact - onmousemove event

Example 2
Example 3:
Account Entity - Body - ondblclick event

Example 3
Example 4:
Account Entity - Account Number - onmousemove event (default Windows style)

Example 4

We hope you found this solution useful :) If you find, by any chance, any mistakes in the tutorial, please let us know. Thank you.

Tuesday, November 27, 2007

How to retrieve the ID of a parent entity

I saw this topic several times in the Microsoft CRM Developer Community and I decided to share this line of code with you :)

Let's take a simple example. We want to retrieve the Quote's ID (guid) when we open the Quote Details form (pressing the New Quote Product on the Quote entity). All we have to do is add the following code on the OnLoad() Event of the child entity (Quote Detail in our case):

var MyOpenerID = opener.document.crmForm.ObjectId;
alert(MyOpenerID);

In the same way, we can also take other values (fields) from the parent entity. Feel free to test ;)

Wednesday, November 21, 2007

Microsoft Dynamics CRM Exam - MB2-423

Done... Complete... 95% passing score... Thanks for the support everyone, especially EVO Software and Thomas Davin :)

Sunday, November 18, 2007

Microsoft Dynamics CRM Exam

This week, on the 21st of November, I'll sustain my first CRM Exam, CRM-30-423 - Microsoft Business Solutions - CRM 3.0 Applications. Wish me luck all :)

Saturday, November 17, 2007

Using the "onmousemove" event

The "onmousemove" event can help you make sure that your script runs as well as your cursor on the form :) I'll give you a brief example of its usage. We want to trap the cursor's coordinates as it moves in a certain entity's form in CRM.

Add the following code on the OnLoad() event of a form you want:

document.onmousemove = function() {
window.status = event.clientX + "x"+event.clientY;
}



Of course, you may attach the "onmousemove" event to the crmForm too, using:

crmForm.onmousemove = function() {
window.status = event.clientX + "x"+event.clientY;
}


But this way, your status will update only if your cursor moves inside the crmForm, not in the entire window like in our first example.

Saturday, November 10, 2007

Using the "onkeyup" event

Let's add some interactivity to our customizations :) For example, we have 4 fields: Amount (Schema Name amount, Type float(2)), Discount
(Schema Name discount, Type float(2)), Tax (Schema Name tax, Type float(2)) and Total Amount (Schema Name totalamount, Type float(2)) and we
want to calculate in real time the Total Amount based on the Amount, Discount and Tax.

First let's consider the following formulas:

Tax = 1.19 * Amount

Discount - between 1 and 100 (percentage of Amount)

Total Amount = (100 - Discount)/100 * Amount + Tax


Second, we create the function that calculates the Total Amount on the basis of the other 3 and we type the following code on the OnLoad() event of a form which contains our fields:

function updateTotalAmount() {

var amount = crmForm.all.amount.DataValue;

var discount = crmForm.all.discount.DataValue;

var tax = crmForm.all.tax.DataValue;

var total;

tax = 0.19 * amount; //we assume that the tax represents 19% of the amount

total = (100 - discount) / 100 * amount + tax;

crmForm.all.tax.DataValue = tax;

crmForm.all.totalamount.DataValue = total;

}


And now, we attach an "onkeyup" event to the amount, discount and tax fields. The event will call our function, like this:


crmForm.all.amount.attachEvent("onkeyup",updateTotalAmount);

crmForm.all.tax.attachEvent("onkeyup",updateTotalAmount);

crmForm.all.discount.attachEvent("onkeyup",updateTotalAmount);


Now, we may test the interactivity of our form. Type a value for the Amount and Discount fields and you'll see, in real time, how the Total Amount field updates.

Here's a printscreen of our example:


onkeyup event

Sunday, November 04, 2007

How to read / write files using JavaScript

To read and write files from JavaScript, we will use an ActiveX Object from the Scripting.FileSystemObject library, which knows how to handle files. The second parameter of the OpenTextFile function represents what we want the object to do with the file (read = 1, write = 2, append = 8).

And here are the scripts:

1. Reading from file

function ReadFromFile(sText){
var fso = new ActiveXObject("Scripting.FileSystemObject");
var s = fso.OpenTextFile("C:\\example.txt", 1, true);
row = s.ReadLine(); //also we can use s.ReadAll() to read all the lines;
alert(row);
s.Close();
}


2. Writing to file

function WriteToFile(sText){
var fso = new ActiveXObject("Scripting.FileSystemObject");
var s = fso.OpenTextFile("C:\\example.txt", 8, true); //if we use 2 instead of 8, the file will be overwritten;
s.WriteLine("new line added");
s.Close();
}


Though, to make this scripts work in Internet Explorer, you must go to Tools/Internet Options/Security, add your page to Trusted sites, then go to Custom level... and look for Initialize and script ActiveX controls not marked as safe for scripting. Enable it and restart the Internet Explorer.

Tuesday, October 30, 2007

Coloring Activities (Tutorial)

Activities are central when working with sales in Microsoft CRM. Whether you need to contact a customer, send a quote, or run a campaign, it is all about activities in Microsoft Dynamics CRM.
Downloading and reading this tutorial you will learn, step by step, a simple interface method of coloring activities in Microsoft Dynamics CRM 3.0 on certain conditions.
Let’s take, for example, the Due Date until when an activity must be executed (closed) and, depending on its status, we will color it in red if it is open and overdue (the current date is greater than the due date) or in black if it is closed or open and not overdue (the due date is greater than the current date).

The links for this tutorial are:
English version --> click here
Romanian version --> click here

We hope you found this solution useful :) If you find, by any chance, any mistakes in the tutorial, please let us know. Thank you.

Saturday, October 27, 2007

Events in JavaScript

Events are the beating heart of any JavaScript application. Without events there are no scripts. Take a look at any web page with JavaScript in it: in nearly all cases there will be an event that triggers the script. The reason is very simple. JavaScript is meant to add interactivity to your pages: the user does something and the page reacts.

Therefore JavaScript needs a way of detecting user actions so that it knows when to react. It also needs to know which functions to execute, functions that do something that you, the web developer, have judged likely to increase the appeal of your pages. These pages describe the best way to write such scripts. It isn’t easy, but it is very satisfying work.

When the user does something an event takes place. There are also some events that aren’t directly caused by the user: the load event that fires when a page has been loaded, for instance.

There are various types of events, such as:
1. Interface Events: onfocus/onblur, oncontextmenu, onload/onunload, onscroll, onresize;
2. Mouse Events: onclick, ondblclick, onmousedown/onmouseup, onmouseenter/onmouseleave, onmouseover/onmouseout, onmousemove, onmousewheel;
3. Form Events: onchange, onreset, onselect, onsubmit;
4. Keyboard Events: onkeypress, onkeydown/onkeyup;
5. Miscellaneous Events: onabort, onerror, onerrorupdate, ontimeerror, onsubtreemodified, onactivate/ondeactivate, onbeforeactivate/onbeforedeactivate, onbeforeprint/onafterprint, onbeforeupdate/onafterupdate, onbeforecut, onbeforecopy, onbeforepaste, oncut, oncopy, onpaste, onpropertychange, onreadystatechange, onresizestart/onresizeend, oncontrolselect, onselectstart, onselectionchange, onbounce, onfocusin/onfocusout, onbeforeeditfocus, onlosecapture, oncellchange, ondrag, ondragenter/ondragleave, ondragover, ondragstart/ondragend, ondrop, onmove, onmovestart/onmoveend, onlayoutcomplete, ondataavailable, ondatasetchange, ondatasetcomplete, onfilterchange, onrowenter, onrowexit, onrowsdelete, onrowsinserted, onstart/onfinish, onhelp, onbeforeunload.

In Microsoft Dynamics CRM, the syntax for using an event is:

crmForm.all.schema_name.attachEvent('event_name',func);
function func() {
//code
}


or

crmForm.all.schema_name.onevent = function() {
//code
}


For example, if you want to display the label for a certain field in CRM when you click the field, all you have to write is one of the following codes on the OnLoad() event:

1. crmForm.all.schema_name.attachEvent('onclick',showLabel);
function showLabel() {
alert(crmForm.all.schema_name_c.innerHTML);
}

2. crmForm.all.new_camp.onclick = function() {
alert(crmForm.all.new_camp_c.innerHTML);
}

Enjoy testing the other events. I’m sure you’ll find them very useful ;)

Sunday, October 21, 2007

About Microsoft Dynamics CRM (brief description)

Microsoft Dynamics CRM is a Customer Relationship Management software package developed by Microsoft. It is a part of the Microsoft Dynamics family of business tools.

The current version of Dynamics is 3.0, released on December, 2005. The most notable updates over the version 1.2 (version 2 was skipped entirely) are the ease of creating customizations to CRM, the switch from using Crystal Reports to Microsoft SQL Reporting Services to run reports, the ability to run on Windows Vista and Outlook 2007, and support for SQL 2005 and Exchange 2007.

There are different versions of Microsoft Dynamics CRM 3.0 available: Microsoft Dynamics CRM 3.0 Professional, Microsoft Dynamics CRM 3.0 Small Business Edition and Microsoft Dynamics CRM 3.0 Professional Edition for Service Providers.

Microsoft CRM also supports integration with Windows Mobile devices via the Microsoft CRM Mobile Client.


Click here for Microsoft Dynamics Official Website