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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 12.11.2010, 01:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
CRMScape: MS CRM Custom Workflow CreateCrmService permissions
Источник: http://crmscape.blogspot.com/2010/11...rmservice.html
==============

If you are writing custom workflows and calling CRM services, you are probably familiar with the following code which creates a service with system administrator access to all data.  ( true = administrator access )

ICrmService service = context.CreateCrmService(true);

You may have noticed that any entities created by a custom workflow using this administrator access default to being created and owned by the account that your Microsoft CRM Asynchronous Processing Service runs as.

This has some trickle down depending on the account your async service is using.

For example if you are using the Local System Account which “typically” does not have a CRM user account dedicated to it, there are some things that you won’t have permission to do.

For example the Local System account doesn’t have permission to send an email and the following will fail even with a service having administrator access.

var sendRequest = new SendEmailRequest
{
EmailId = emailId,
IssueSend = true,
TrackingToken = String.Empty
};

sendEmailService.Execute(sendRequest);
This will give you the following SoapException:


  0x80040216
  An unexpected error occurred.
  Platform


You could create another service reference like below just to send email with which will work as long as the user running the workflow can normally send an email from a workflow.
ICrmService sendEmailService = context.CreateCrmService(false);

You could also use a CRM user CAL and create a CRM user for the account your async service runs as.

The important thing to realize is that any service request that requires user configuration in order to function beyond security role permissions will be dependent on whether there is a CRM user assigned to the account the acync service is running under and how that CRM user is configured. For example: whether the email access type is E-mail Router.




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

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Все о Microsoft Dynamics CRM: Как установить Microsoft Dynamics CRM 2011 Beta Blog bot Dynamics CRM: Blogs 0 31.10.2010 15:08
Ошибка бизнес-процесса Tarasov E Dynamics CRM: Разработка 9 18.02.2010 14:02
Muhammad Ali Khan: Relating/Connecting MS CRM 4.0 Data With Custom External Content Type Data In SharePoint 2010 Blog bot Dynamics CRM: Blogs 0 04.02.2010 13:05
CRM DE LA CREME! Configuring Microsoft Dynamics CRM 4.0 for Internet-facing deployment Blog bot Dynamics CRM: Blogs 0 18.08.2009 11:05
Microsoft Dynamics CRM Team Blog: Workflow E-mail Utilities Blog bot Dynamics CRM: Blogs 0 16.12.2008 23:05

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

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

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