我無法通過更新使用CRM 2011的接觸sdk.Here是我使用這樣做的代碼更改客戶端使用SDK的接觸裏面的帳戶參考:無法改變crm2011
Entity contact = new Entity();
contact.LogicalName = "contact";
contact.Attributes = new AttributeCollection();
EntityReference clientLookup = new EntityReference();
clientLookup.Id = NewClientBId;
clientLookup.LogicalName = "account";
contact.Attributes.Add("parentcustomerid", clientLookup);
contact.Attributes.Add("contactid", workItem.Id);
SynchronousUtility.UpdateDynamicEntity(CrmConnector.Service, contact);
該代碼運行良好沒有任何錯誤,但當我去網絡門戶,並檢查記錄,它仍然指向舊帳戶,雖然更新修改時間stamp.I還檢查了sql profiler查詢顯示如下:
EXEC sp_executesql的N'update [ContactBase]設置 [ModifiedOn] = @國防部ifiedOn0,[ModifiedBy] = @ ModifiedBy0, [ModifiedOnBehalfBy] = NULL其中([使用ContactID] = @ ContactId0) 'N '@ ModifiedOn0日期時間,@ ModifiedBy0 唯一標識符,@ ContactId0 唯一標識符',@ ModifiedOn0 =' 2013- 07-04 9時21分02' 秒,@ ModifiedBy0 = '2F8D969F-34AB-E111-9598-005056947387',@ ContactId0 = 'D80ACC4E-A185-E211-AB64-002324040068'
如可以看到的在我更新的列上方甚至沒有更新查詢的set子句。有誰能幫我解決這個問題嗎?
只是要添加到它,它不與only.I不能改變在接觸任何其他信息帳戶有關的問題。 – atul
「Contact_EntityName」,「Custome_EntityName」,「CustomerIdColumnNameInContact」,「ContactIdentityColumn」的值? –
剛剛更新我的問題與恆定變量值Guido Preite – atul