AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 13.08.2009, 15:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,492 / 847 (79) +++++++
Регистрация: 28.10.2006
CRMScape: RFC822 Import to MS CRM email activity utility
Источник: http://crmscape.blogspot.com/2009/06...-activity.html
==============

When migrating from Goldmine and some other CRM systems to MS CRM there is sometimes a need to import historical email.  This is frequently stored in a SQL database in rfc822 format. RFC822 is an email format standard.

What I am providing is a single class along with a file from the MS CRM SDK that this class currently uses. This single class is consolidated from a number of other classes in my import framework and is intended to give you a nearly complete rfc822 import solution that you can modify for your needs.  Every place that you need to make a modification according to your particular system has a //TODO: comment explaining what you need to adjust particular to your configuration. In addition assume that there will be some tweaking required, and make sure to do thorough debugging and testing to verify that your email records are being properly generated.

You can download the source code here.

There are 2 steps to using this class.

Part 1: Initialize a new RFC822ToEmailActivity object.

var emailConversion = new RFC822ToEmailActivity("Contoso"); // Your Orgname
Part 2: Calling the CreateEmailFromRfc822Record() method

CreateEmailFromRfc822Record() should be called in your loop that is reading the rfc822 records

var emailEntity = emailConversion.CreateEmailFromRfc822Record(     rfc822Record, // This is the string holding the whole 822 record     localEmailDomainName, // This is the local email domain name ex. onecrmpro.com      emailOwnerId, // systemUserId of email entity owner     relatedEntityName, // contact or account or....     relatedEntityId // id of the entity to regard the email to)
  1. Calls parsing method
  2. Creates email attachments from pathnames returned from parsing method.
  3. Writes to an error log file with all attachments that are not found and other errors.
  4. Makes any other changes to the email entity before saving it.
  5. Sets Email State as completed (sent or received) based on local domain name.
Called Internally: ParseRFC822() parsing and email activity creation.
  1. Parse an rfc822 record
  2. Create an email activity based on that record.
  3. Compare email addresses, both To: and From: with a local domain name to decide if the email is incoming or outgoing.
  4. Create ActivityParties for To:, CC:, BCC:, From: related to CRM users, Contacts, Accounts and Leads in that match order precedence.
  5. Return a list of pathnames to any attachments.
RFC882 Email Attachments

Products like Gold Mine are storing email bodies in the database but they only have pathnames to the attachments. These attachment paths are frequently on the end user’s local computer which can be unreliable. These attachments may have been renamed, moved or deleted.

Hint1: Create a single shared folder on a file server with a separate tree branch for each computer that has attached files in the email history and modify the pathnames programmatically to match the structure you create on the file server.

Example:
S:\importattachments\C\Documents and Settings\mkovalcson\My Documents



Hint2: Comment out or create a test mode where nothing is written into the CRM database, but missing attachments are still written to a log file where you can see what isn’t found and decide how important it is to hunt attachments down before the final import.

You may want to look at this before you get started.
MS CRM Data Import (Cleaning up the Mess)




Источник: http://crmscape.blogspot.com/2009/06...-activity.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
CRMScape: MS CRM 4.0, xRM and building blocks Blog bot Dynamics CRM: Blogs 0 13.08.2009 15:05
Microsoft Dynamics CRM Team Blog: Using the Microsoft Dynamics CRM Online Import Wizard Blog bot Dynamics CRM: Blogs 0 08.04.2009 01:06
Microsoft Dynamics CRM Team Blog: Building Rich-Client Dashboards for Microsoft Dynamics CRM with Windows Presentation Foundation Blog bot Dynamics CRM: Blogs 1 31.03.2009 13:24
Microsoft Dynamics CRM Team Blog: List Web Part for Microsoft Dynamics CRM 4.0 Deployment Scenarios Blog bot Dynamics CRM: Blogs 0 30.01.2009 22:05
Microsoft Dynamics CRM Team Blog: Microsoft Dynamics CRM, Email correlation and smart matching Blog bot Dynamics CRM: Blogs 0 12.11.2008 04:08

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 18:33.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.