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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 02.06.2009, 16:10   #1  
Kipetcoff is offline
Kipetcoff
Участник
 
136 / 16 (1) ++
Регистрация: 20.05.2009
Адрес: Санкт-Петербург
Решил покопаться с помощью sql profiler. поочередно запускал все действия во время работы программы. Единственное что не сработало это

"exec sp_executesql N'insert into QueueItemBase(QueueId, OrganizationId, State, Status, ObjectId, ModifiedOn, Priority, CreatedBy, ObjectTypeCode, TimeZoneRuleVersionNumber, EnteredOn, Title, ModifiedBy, QueueItemId, DeletionStateCode, CreatedOn, UTCConversionTimeZoneCode) values (@QueueId0, @OrganizationId0, @State0, @Status0, @ObjectId0, @ModifiedOn0, @Priority0, @CreatedBy0, @ObjectTypeCode0, @TimeZoneRuleVersionNumber0, @EnteredOn0, @Title0, @ModifiedBy0, @QueueItemId0, @DeletionStateCode0, @CreatedOn0, @UTCConversionTimeZoneCode0)',N'@QueueId0 uniqueidentifier,@OrganizationId0 uniqueidentifier,@State0 int,@Status0 int,@ObjectId0 uniqueidentifier,@ModifiedOn0 datetime,@Priority0 int,@CreatedBy0 uniqueidentifier,@ObjectTypeCode0 int,@TimeZoneRuleVersionNumber0 int,@EnteredOn0 datetime,@Title0 ntext,@ModifiedBy0 uniqueidentifier,@QueueItemId0 uniqueidentifier,@DeletionStateCode0 int,@CreatedOn0 datetime,@UTCConversionTimeZoneCode0 int',@QueueId0='00000000-0000-0000-0000-000000000000',@OrganizationId0='00B573ED-1D22-4EF7-8DB1-6016CAA1EB35',@State0=0,@Status0=2,@ObjectId0='50F7396A-6B4F-DE11-84BC-0003FF94D69B',@ModifiedOn0='2009-06-02 11:49:24:000',@Priority0=1,@CreatedBy0='D874E288-2C8C-43D5-AEBA-5404888BC185',@ObjectTypeCode0=4212,@TimeZoneRuleVersionNumber0=0,@EnteredOn0='2009-06-02 11:49:24:000',@Title0=N'subjectText.Text',@ModifiedBy0='D874E288-2C8C-43D5-AEBA-5404888BC185',@QueueItemId0='51F7396A-6B4F-DE11-84BC-0003FF94D69B',@DeletionStateCode0=0,@CreatedOn0='2009-06-02 11:49:24:000',@UTCConversionTimeZoneCode0=0
"
Ошибка на все это "Msg 547, Level 16, State 0, Line 1
The INSERT statement conflicted with the FOREIGN KEY constraint "queue_entries". The conflict occurred in database "MicrosoftCRM_MSCRM", table "dbo.QueueBase", column 'QueueId'.
The statement has been terminated."

Где можно трассировку посомтреть в CRM?
Старый 02.06.2009, 17:23   #2  
Kipetcoff is offline
Kipetcoff
Участник
 
136 / 16 (1) ++
Регистрация: 20.05.2009
Адрес: Санкт-Петербург
В трассировке именно то что я в SQL нашел... "System.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "queue_entries". The conflict occurred in database "MicrosoftCRM_MSCRM", table "dbo.QueueBase", column 'QueueId'."
Старый 02.06.2009, 18:15   #3  
Kipetcoff is offline
Kipetcoff
Участник
 
136 / 16 (1) ++
Регистрация: 20.05.2009
Адрес: Санкт-Петербург
Заработало..я поменял код создания сервиса

Код:
CrmAuthenticationToken token = new CrmAuthenticationToken();
			token.OrganizationName = sOrgname;
			token.AuthenticationType = 0;

			//Create the Service 
			CrmService crmService = new CrmService();
			//crmService.Credentials = System.Net.CredentialCache.DefaultCredentials;
			crmService.Credentials = new System.Net.NetworkCredential("administrator", "pass@word1");
			crmService.PreAuthenticate = false;
			crmService.CrmAuthenticationTokenValue = token;
			string crmurl = (string)(Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\MSCRM").GetValue("ServerUrl")) + "/2007/crmservice.asmx";
			crmService.Url = crmurl;
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Новый пользователь из другого домена if_maks Dynamics CRM: Администрирование 27 11.11.2009 14:54
Как лучше реализовать? Создать новый объект или... Sederick Dynamics CRM: Функционал 12 08.04.2009 14:04
Plugin на для обновления задачи (Task) Bondonello Dynamics CRM: Разработка 14 25.02.2009 12:13
связь через новый объект valk Dynamics CRM: Разработка 3 07.12.2007 08:56
связь через новый объект valk Dynamics CRM: Разработка 0 06.12.2007 12:09
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра
Комбинированный вид Комбинированный вид

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 20:39.