在联系人记录的更新字段上,我想在 dynamics crm 365 online 中创建一个 systemuser(user)。
这是我正在尝试创建用户的以下代码
Entity getEntity = (Entity)context.InputParameters["Target"];
string str = getEntity.Attributes["new_isaeon"].ToString();
if (str != null && str == "True")
{
// http://localhost:51625/api/Users
Entity sysuser = new Entity("systemuser");
sysuser.Attributes["fullname"] = "hsk";
sysuser.Attributes["internalemailaddress"] = "projectservice_9@crmdemo.dynamics.com";
sysuser.Attributes["domainname"] = "projectservice_9@crmdemo.dynamics.com";
Guid getGuid = new Guid("700F2217-786A-E811-A95A-000D3AF2793E");
sysuser.Attributes["businessunitid"] = new EntityReference("businessunit", getGuid);
sysuser.FormattedValues["accessmode"] = "Read-Write";
Guid getuserid = service.Create(sysuser);
}
任何人都可以帮助我,谢谢。
慕森卡
相关分类