Dynamics CRM 2011 SDK 删除具有依赖项的属性
我在删除具有 SDK 依赖项的实体属性时遇到问题。 要删除我需要的属性:
- RetrieveAttribute
- RetrieveDependencyForDeleteRequest
- DeleteRelationshipRequest
- 和最后的DeleteAttributeRequest
如果您对上述计划或示例代码有任何建议,我将不胜感激。 到目前为止,我在 msdn 上找不到示例。
I'm having troubles with removing the attribute of entity which have dependencies from SDK.
To remove an attribute I need:
- RetrieveAttribute
- RetrieveDependenciesForDeleteRequest
- DeleteRelationshipRequest
- and finally DeleteAttributeRequest
I would be appreciated for any advise about the plan above or sample code.
I couldn't find example at msdn so far.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,
RetrieveDependencyForDeleteRequest
似乎告诉您必须先删除关系,然后才能删除属性;而你正在这样做。我希望这是一个查找属性?
它以实体形式可见吗?
只要实体表单依赖该属性,您就无法删除该属性。
So it appears that the
RetrieveDependenciesForDeleteRequest
is telling you that you have to delete a relationship before you can delete the attribute; and you are doing so.I expect that this is a look-up attribute?
Is it visible in the entity form?
You won't be able to delete the attribute as long as the entity form has a dependency on it.