[英]Dynamics CRM 2011 - How I should install my custom entities when installing or deploying my solution
I am trying to do a solution which has custom entities and should create some basic data when it is installed by first time, let's say that is going to install some data in 'Roles'. 我正在尝试做一个具有自定义实体的解决方案,并在首次安装时创建一些基本数据,比如说要在“ Roles”中安装一些数据。 How I shoul achieve it?
我该如何实现? I am making code to create this custom entities, but I do not know when execute this code.
我正在编写代码来创建此自定义实体,但是我不知道何时执行此代码。 I saw that there is other way making the custom entities by code or using the UI of solutions, then export it (the solution with the entities are exported) whith that I can import it again to deploy my solution.
我看到还有其他方法可以通过代码或使用解决方案的用户界面来创建自定义实体,然后将其导出(导出具有实体的解决方案),然后我可以再次导入它来部署我的解决方案。
Can somebody point me in the right way? 有人可以用正确的方式指出我吗?
To clear up any confusion of terms here: 要清除此处的术语混淆:
When you say 'Roles' I assume you are referring to the 'Security Roles', these can be included in solutions. 当您说“角色”时,我假设您是指“安全角色”,它们可以包含在解决方案中。
You can (and should) use a solution file to move all customisations from one environment to another. 您可以(并且应该)使用解决方案文件将所有自定义项从一个环境移至另一个环境。
These are all the parts that can be included in a solution (taken from the MSDN ). 这些都是解决方案中可以包含的所有部分(摘自MSDN )。
For all your records (or data) you will have to import these manually. 对于所有记录(或数据),您将必须手动导入。 CRM has out of the box features for data import, or you could script it with some web service calls.
CRM具有开箱即用的数据导入功能,或者您可以通过一些Web服务调用来编写脚本。
So in this case I believe you need to: 因此,在这种情况下,我认为您需要:
For a better overview of solutions I would suggest having a read of the MSDN . 为了更好地了解解决方案,我建议您阅读MSDN 。
Edit (based on comment): 编辑(基于评论):
Re: 1 - You need to build a solution for your customisations and entities. 关于:1-您需要为您的定制和实体构建解决方案。 When you export the solution all the customisations are included automatically in the XML files, you can then import the solution as a whole into another system.
导出解决方案时,所有自定义项都会自动包含在XML文件中,然后可以将解决方案作为一个整体导入另一个系统。
If you dont know how to create a solution watch this video . 如果您不知道如何创建解决方案,请观看此视频 。
Re: 2 - Do the data import manually once you have imported the solution. 关于:2-导入解决方案后,手动进行数据导入。
If you dont know how to do a data import watch this video . 如果您不知道如何进行数据导入,请观看此视频 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.