瞭解您正在使用哪個ETL會很有用,但是在進行數據遷移時需要考慮一件重要的事情。 如果要創建一個新的記錄,來指定所有者就足以設置字段爲EntityReference
Entity contact = new Entity("contact");
contact["firstname"] = "John";
Guid ownerId = new Guid("BFC777ED-5E79-E111-8489-00166D63156F");
contact["ownerid"] = new EntityReference("systemuser", ownerId);
service.Create(contact);
如果要更新聯繫人,你需要使用AssignRequest與其他主題解釋
Guid contactId = new Guid("90F8889F-EB95-E781-8417-000C44420CBC");
Guid newOwnerId = new Guid("BFCAA4ED-5E79-E781-8349-00155BB3156F");
AssignRequest assignRequest = new AssignRequest
{
Assignee = new EntityReference("systemuser", newOwnerId),
Target = new EntityReference("contact", contactId)
};
service.Execute(assignRequest);
對不起,我似乎不得不使用SDK工具包來做到這一點,我還沒有那麼遠! – 2013-04-03 12:54:08