Показать сообщение отдельно
Старый 02.03.2010, 10:00   #2  
Артем Enot Грунин is offline
Артем Enot Грунин
Moderator
Аватар для Артем Enot Грунин
MCBMSS
Злыдни
Most Valuable Professional
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии AXAWARD 2013
Лучший по профессии 2011
Лучший по профессии 2009
 
3,912 / 623 (28) +++++++
Регистрация: 16.08.2007
Адрес: Пермь!
Записей в блоге: 151
Используйте InstantiateTemplate Message

// Set up the CRM Service.
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Create a template instantiation request.
InstantiateTemplateRequest instTemplate =
new InstantiateTemplateRequest();

// The email template to use.
instTemplate.TemplateId =
new Guid("9AF74EF9-A04C-DA11-A0C5-000D9DD8CDAC");

// The object that this email is regarding.
instTemplate.ObjectId = new Guid("A0F2D8FE-6468-DA11-B748-000D9DD8CDAC");
instTemplate.ObjectType = EntityName.account.ToString();

//Uncomment this next line to return dynamic entities.
//instTemplate.ReturnDynamicEntities = true;

// Execute the request to create an email message from the template.
InstantiateTemplateResponse instTemplateResponse =
(InstantiateTemplateResponse)service.Execute(instTemplate);
__________________
http://fixrm.wordpress.com, снятие/наведение порчи. Быстро, дорого, гарантия.

MS Certified Dirty Magic Professional
За это сообщение автора поблагодарили: wb (1).