动态CRM:需要通过API

时间:2015-05-04 10:37:54

标签: dynamics-crm

我通过以下代码(Dynamics Crm: creating Connection entities via API

创建了API连接
Entity connection = new Entity("connection");
connection["record1id"] = new EntityReference("contact", someContactId);
connection["record1objecttypecode"] = new OptionSetValue(2);
connection["record1roleid"] = new EntityReference("connectionrole",    someConnectionRoleId);
connection["record2id"] = new EntityReference("incident", someCaseId);
connection["record2objecttypecode"] = new OptionSetValue(122);
connection["record2roleid"] = new EntityReference("connectionrole", someOtherConnectionRoleId);
var newId = service.Create(connection);

问题:我需要更新两个记录之间的连接角色。

1 个答案:

答案 0 :(得分:0)

如果我正确理解了这个问题,您只需沿着同一条路前进,使用您从$this->session->sess_destroy(); 获得的ID来引用该记录:

Create