|
![]() |
#1 |
Участник
|
вот код создания сервиса:
Код: internal static CrmService GetCrmService(IPluginExecutionContext context, Boolean flag) { CrmAuthenticationToken authToken = new CrmAuthenticationToken(); authToken.AuthenticationType = 0; authToken.OrganizationName = context.OrganizationName; if (flag) authToken.CallerId = context.UserId; else authToken.CallerId = context.InitiatingUserId; CrmService service = new CrmService(); service.CrmAuthenticationTokenValue = authToken; service.UseDefaultCredentials = true; //service.Credentials = System.Net.CredentialCache.DefaultCredentials; CorrelationToken corToken = new CorrelationToken(); corToken.CorrelationId = context.CorrelationId; corToken.CorrelationUpdatedTime = context.CorrelationUpdatedTime; corToken.Depth = context.Depth; Microsoft.Win32.RegistryKey regkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\MSCRM"); service.Url = String.Concat(regkey.GetValue("ServerUrl").ToString(), "/2007/crmservice.asmx"); service.CorrelationTokenValue = corToken; return service; } |
|
![]() |
#2 |
Участник
|
А объект quote создается вручную? из формы?
|
|
![]() |
#3 |
Участник
|
да, новая квот из объекта оппортюнити
|
|
![]() |
#4 |
Участник
|
А зачем тогда plugin регистрить на child pipeline?
|
|
|
За это сообщение автора поблагодарили: maclai (1). |
|
|