我正在尝试在Dynamics 365中创建一个任务记录,我希望所有者成为我已经检索过GUID的团队记录.
这是我的JSON,它总是失败.
{
"ownerid_team@odata.bind":"/teams(f7e383eb-3966-e711-8122-e0071b66c021)",
"scheduledend":"2017-07-20",
"regardingobjectid_new_survey@odata.bind":"new_surveies(f7e383eb-3966-e711-8122-e0071b84b034)",
"subject":"Amazon SES has suppressed sending to this address because it has a recent history of bouncing as an invalid address.",
}
Run Code Online (Sandbox Code Playgroud)
我得到了一个糟糕的要求.
我们是否可以不使用Web API更新记录的所有者字段?我找不到任何描述相同的具体限制.
microsoft-dynamics dynamics-crm asp.net-web-api dynamics-365
我可以使用Dictionary对象数组吗?
我有一个XML,我想修改.我要使用的数据结构是这样的 -
Dictionary<element, Dictionary<attr, value>>
Run Code Online (Sandbox Code Playgroud)
element - 是我要修改的元素attr - 我要更新值的属性值 - 我要更新的值
<Parents>
<Parent id="ParentA" description="New">
<Children>
<Child name="ChildA" />
</Children>
</Parent>
</Parents>
Run Code Online (Sandbox Code Playgroud)
我想通过以下内容
Dictionary<string, string> dict_Attributes1=new Dictionary<string, string>();
Dictionary<string, string> dict_Attributes2=new Dictionary<string, string>();
dict_Attributes1.Add("id", "ParentB");
dict_Attributes1.Add("description", "Old");
dict_Attributes2.Add("name", "ChildB");
Dictionary<string, Dictionary<string, string>> dict_Elements = new Dictionary<string, Dictionary<string, string>>();
dict_Elements.Add(".", dict_Attributes1);//To update the Element
dict_Elements.Add("Children/Child", dict_Attributes2);//To update the Children's Attributes
Run Code Online (Sandbox Code Playgroud)
让我们假设我已经确定我要更新其父ID为ParentA的父.
现在,我在这里创建dict_Attributes1,dict_Attributes2等,有没有一种方法可以将它们存储在(动态,大小未知的编译时)Dictionary对象数组中?
或者,是否有更好的方法 - 1.修改Selected XElement的属性及其子属性?
编辑
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<Environments>
<Environment id="Master" description="MasterSystem">
<Systems>
<DefaultSystem systemName="Master" server="http://localhost" …Run Code Online (Sandbox Code Playgroud) 我正在尝试编写查询以从Contact表中检索数据.所以,让我们说我想要以下字段
FirstName,LastName和Gender.
现在,性别字段是gendercode,它是一个选项集,此数据位于StringMapBase中.
查询返回sexcode的文本值是什么?
我可以写这个,但肯定有更好的写作方式.
SELECT FirstName, LastName, GenderCode FROM Contact
Run Code Online (Sandbox Code Playgroud)
用于检索文本值
SELECT FirstName, LastName, GenderCode, sm.Value as Gender FROM Contact c, StringMap sm
WHERE c.GenderCode = sm.AttributeValue
AND sm.AttributeName = 'gendercode'
Run Code Online (Sandbox Code Playgroud)
有什么建议?
我有一个名为Document Access的实体.现在,此实体文档访问与事件具有N:1关系(一个事件可以具有许多文档访问权限).
当有人创建新的文档访问记录时,我有一个JS来检查创建记录的人(当前登录用户)是否与事件的所有者相同.如果没有,我不允许创建(这是在保存记录上设置的).
文档访问记录的所有者可以是任何人(不一定是事件的所有者).除非由事件所有者完成,否则如何确保防止删除这些文档访问记录?