13 Aralık 2007 Perşembe

Microsoft Dynamic CRM 3.0 Templates

Templates allow you a convenient means of standardizing the content and layout of similar documents in
Microsoft CRM. You can use three types of templates:

Contract
Article
E-mail

Because they're all templates, you might expect the setup of these three types to be similar. In reality, their
functionality and usage in the application is quite different.

In this dialog box, you can choose which E-mail template to send. Because E-mail templates are defined with
an entity type, you can select only templates specific to the entity that you're working with or one of the global
templates. In our example, you could not send an Account or Contact template from this page because we
clicked the Direct E-mail button from the Leads grid toolbar. To select an E-mail template, simply click its
name in the selection box.

Tip If you move your mouse cursor over the description text, CRM will display the entire text of the E-mail
template description.

After you select the E-mail template that you want to send, you can specify to which records you want to send
the message. As the dialog box explains, you can send the message to just the selected records, to all the
records on the current page, or to all the records in the selected view.

Regardless of the value that you select here, Microsoft CRM will not send Direct E-mail messages to any
Account or Contact record if the Do Not Allow Bulk E-mails or Do Not E-mail attributes for the record are set to
Do Not Allow.

By default, Microsoft CRM sends the e-mail message as coming from the user who is currently logged on. You
can change this value by clicking the lookup button and selecting a different user or queue.

Caution Be very careful when using the Direct E-mail feature! When you click the Send button, Microsoft
CRM sends the message immediately. There is no "preview" or "cancel" option, so make sure
that your message is ready to send.

When you use the Direct E-mail feature, Microsoft CRM sends messages through Microsoft Exchange Server.
Therefore, use some discretion when sending a very large number of messages at one time. Some factors
that come into play include the hardware specifications on your servers, your network performance, your
Internet bandwidth, and the amount of load on the server. Although no published specifications exist and the
numbers can range widely depending on your infrastructure, if you need to send more than 10,000 to 20,000
e-mail messages in one hour, we recommend that you explore the option of using third-party e-mail engines
instead of Exchange Server.

Inserting Templates into E-Mail Messages

Sometimes you will not want to use the Direct E-mail feature because you can't edit or add content to the e-
mail message before Microsoft CRM sends it. Fortunately, you can insert an E-mail template into an individual
e-mail message that you're composing so that you can modify it before you send it. When you're writing a
message in the Web client, you can click the Insert Template button (shown in Figure 2-8) to open the dialog
box shown in Figure 2-7. You must select at least one e-mail recipient before you can insert a template,
because Microsoft CRM must know which template types apply to the message (based on the entity type ofthe recipients).

After you select an E-mail template, Microsoft CRM automatically populates the template content in the body
of the message and fills out any data fields that the E-mail template might contain. This is a convenient feature
if you want to edit or add additional content to an e-mail before you send it (something you can't do with the
Direct E-mail feature). If your e-mail message includes multiple recipients, you must select one of them as the
E-mail template target when you insert a template into the message.

Warning Each time you insert an E-mail template into the body of an e-mail message, Microsoft CRM
updates the subject line of the e-mail message to match the subject of the E-mail template. So if
you insert multiple templates, the subject will be determined by the last template inserted. This is
very convenient for writing new e-mails, but you should be aware of this behavior if you insert E-
mail templates when you reply to messages.

You cannot insert an E-mail template into an Outlook e-mail message if you are using the Microsoft CRM
client for Outlook.

Creating or Modifying E-Mail Templates

Now that you understand some of the ways in which you can use E-mail templates in Microsoft CRM, let's
discuss how you can create and set up new E-mail templates. Microsoft CRM includes 18 E-mail templates in
the default installation, including:

Lead Reply — Web Site Visit

Lead Reply — Trade Show Visit

Closed Case Acknowledgement

Marketing Event Notification

Order Thank You

You can modify these default templates or create entirely new E-mail templates that meet your needs. To view
the E-mail templates that are currently in your system, browse to the Settings area of Microsoft CRM, click
Templates, and then click E-mail Templates. A grid displays all the E-mail templates and their types. Simplydouble-click any record to view a template, such as the Follow-Up to Our Meeting template.
You can see that a template contains several attributes, such as:

Type Whether the template is global or applies only to an individual entity.

Title Short title of the E-mail template that appears when users select a template.

Description Additional descriptive text that explains the function of the E-mail template. Users can
access the description when they select a template.
Subject The subject line of the e-mail message.
Body The body of the e-mail message. It isn't labeled on the form, but this is the large text box below the
subject.
You can also see in Figure 2-9 that the E-mail template includes a highlighted data field that contains data
such as the following:

{!Contact:Full Name;Potential Customer}


Microsoft CRM automatically converts this data field to the full name of the Contact for this record. The text
before the colon refers to the entity, and the text after the colon specifies the attribute name. If an Opportunity
record does not have a Contact Full Name value, you can include a default value for the data field by entering
text after the semicolon. In this example, Microsoft CRM would insert the following text in the e-mail message
if there were no data in the Opportunity record for the Contact Full Name value:

Potential Customer
To add a new data field to an E-mail template, click the Insert/Update button on the form toolbar.

When you click the Add button, another dialog box prompts you to select the Record Type and Field for the
data field. Depending on the entity you selected for the E-mail template type, you can add fields from different
related entities. For example, on Lead E-mail templates, you can only add fields from the Lead and User
entities. However, for Opportunity E-mail templates, you can add fields from the Account, Contact,
Opportunity, and User entities. After you select the field that you want to add and click OK, the field appears in
the Data Field Values list. Then you can specify the default value text (optional) by entering it in the Default
Text box. When you click OK, Microsoft CRM adds the data field to the E-mail template.

Tip You can add data fields to both the subject and body of an E-mail template.

If you want to add multiple data fields to an E-mail template, you must add them one at a time, as in this
example:

{!Contact : Salutation;} {!Contact : Last Name;}


These data fields would insert the following text into an e-mail message for a sample Contact, Mr. Bill Gates:

Mr. Gates

However, if you added both data fields at the same time by using the Data Field Values dialog box, Microsoft
CRM would create one data field in the template, like this:

{!Contact : Salutation;Contact : Last Name;}

This data field would insert the following text for the same Contact:
Mr.


As you can see, Microsoft CRM allows you to enter a dynamic data field for the default value of a different
data field. In this example, Contact: Last Name is the default value for the Contact: Salutation data field.
However, because the Contact record included a value for the salutation, it didn't need to output the default
value of Contact: Last Name.
Creating a new E-mail template is straightforward enough. Just click the New button on the grid toolbar, select
the entity type for the E-mail template, and then enter the appropriate information in the template fields. After
you set up your new template with the attributes and data fields that you want, simply click Save on the E-mail
template toolbar. Microsoft CRM immediately applies your changes to the E-mail template and users can
access it.
Tip When you enter and edit text in the E-mail template body, pressing Enter on your keyboard adds an
extra line. If you want a single carriage return (instead of a new paragraph), simply press Shift+Enter
instead.

Creating and Sharing Personal E-Mail Templates

The process we just explained will create an E-mail template that the entire organization can view and use.
Users can also create personal templates for their own use. To create a personal E-mail template, follow these
steps:
1. On the application menu bar, click Tools, and then click Options.

2. On the E-mail Templates tab, click New on the grid toolbar, and then follow the steps for creating an
organization E-mail template.

If a user decides that he or she wants to share an E-mail template with the entire organization, he or she can
convert a personal template to an organization template at any time. To do this, open the E-mail template that
you want to convert, and then click Make Template Available To Organization on the Actions menu. Microsoft
CRM immediately updates the E-mail template. If necessary, you can undo this conversion by clicking Revert
To Personal Template on the Actions menu.

Tip E-mail templates follow the security settings and privileges related to the E-mail template entity and its
user ownership (Chapter 3 explains security and privileges in detail). Therefore, you can configure the
user security roles and E-mail template ownership however you choose, such as allowing users to see
only the templates for their specific business units.

Inserting Graphics and HTML into E-Mail Templates

After you create a few E-mail templates, you'll probably notice that the editing tools for the e-mail message
body are somewhat limited. For example, you cannot use the available buttons to add a hyperlink or an image
to the message. If you want to develop a more sophisticated E-mail template with multiple images, links, and
so on, you will probably want to create HTML code with a development tool such as Microsoft Visual Studio
.NET. However, if you try to copy and paste your HTML code into the E-mail template, it is displayed as plain
text; your recipient would receive a bunch of HTML code instead of the nice formatted version of your
message! Fortunately, with just a little trick you can easily copy and paste your custom HTML code into the E-
mail template and still maintain the correct formatting.

First, let's assume that you want to send a simple company newsletter to contacts in your database by using
an E-mail template with the following requirements:

Display the company logo in the message.
Address the customers by their first names.

Add a hyperlink that readers can click to get more information.
We created some sample HTML code in Visual Studio .NET that will meet these requirements.

Next, we want to create a new E-mail template for the Contact entity and insert our sample code into the
template. Browse to the Settings area of Microsoft CRM, click Templates, and then click E-mail templates.
Click the New button on the grid toolbar, select the Contact entity from the drop-down list, and then click OK.
The new E-mail template form appears, and you can use any title, description, and subject that you want.

If you just typed the sample HTML code from Figure 2-11 into the body of the message, it would appear as
plain text. Therefore, we want to copy (Ctrl+C) the sample newsletter and paste (Ctrl+V) it into the e-mail
message body. You can accomplish this in a few ways, such as:

Copy and paste the HTML code from Visual Studio .NET HTML view
Copy and paste the formatted message from Visual Studio .NET Design view
Copy and paste the formatted message from Microsoft Office FrontPage 2003 Design view

Important You cannot copy and paste HTML code from a text editor program such as Notepad into the
E-mail template. In addition, you cannot copy and paste HTML code from FrontPage 2003
Code view.
After you copy and paste the contents of the message into the E-mail template body, you will see the properly
formatted e-mail message, complete with an image and a hyperlink. After we pasted the code into the
message, we added a data field to display the contact's first name in our newsletter, to satisfy our original requirement.

If you try this copy-and-paste technique but it does not work, confirm that you have the following element at
the top of your HTML code.You can also try using the copy and paste technique with other applications, such as Microsoft Internet
Explorer. The success of this technique varies depending on the format that different applications use to copydata to the clipboard.

1 comments:

Adsız dedi ki...

just linked this article on my facebook account. it’s a very interesting article for all.
Email Security Solutions