|
![]() |
#1 |
Участник
|
Решил покопаться с помощью 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? |
|
![]() |
#2 |
Участник
|
В трассировке именно то что я в 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'."
|
|
![]() |
#3 |
Участник
|
Заработало..я поменял код создания сервиса
Код: 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; |
|
|
![]() |
||||
Тема | Ответов | |||
Новый пользователь из другого домена | 27 | |||
Как лучше реализовать? Создать новый объект или... | 12 | |||
Plugin на для обновления задачи (Task) | 14 | |||
связь через новый объект | 3 | |||
связь через новый объект | 0 |
Опции темы | Поиск в этой теме |
Опции просмотра | |
|