[英]Dynamics CRM fill relationship data in new form/entity according to parent form/entity
When I open some company in CRM, I have ability to add new contact from that particular company.当我在 CRM 中开设一些公司时,我可以添加来自该特定公司的新联系人。 When new contact form is open it is already filled with mapping values from that company (company name, telephone, address...).当新的联系表单打开时,它已经填充了来自该公司的映射值(公司名称、电话、地址...)。
That is a great feature.这是一个很棒的功能。 I want to implement that by myself with web resource in JavaScript.我想用 JavaScript 中的网络资源自己实现。 Web resource only contains buttons to the new entity. Web 资源仅包含指向新实体的按钮。 I want to open new entity (in my case to open new contact from particular company) and that new entity should have already filled input according to some custom relationship mapping which I made.我想打开新实体(在我的情况下是打开来自特定公司的新联系人),并且该新实体应该已经根据我制作的一些自定义关系映射填写了输入。
How I did that:我是如何做到的:
1) Am looking for custom relationship name (it is in configuration). 1)正在寻找自定义关系名称(在配置中)。
2) After that I am looking for mapping fields between two entities according to relationship. 2)之后,我根据关系寻找两个实体之间的映射字段。
3) Finally according to page "Set field values using parameters passed to a form" ( https://msdn.microsoft.com/en-us/library/gg334375.aspx ) I am passing mapping fields value from company to contact form. 3)最后根据页面“使用传递给表单的参数设置字段值”( https://msdn.microsoft.com/en-us/library/gg334375.aspx )我将映射字段值从公司传递到联系表单。
Is there any easier way to do that, just to pass name of relationship and particular company and that my new contact form be automatically filed with values from company according to relationship ?有没有更简单的方法来做到这一点,只是传递关系和特定公司的名称,并且我的新联系表格会根据关系自动提交公司的值?
You can issue an InitializeFromRequest
to the server.您可以向服务器发出InitializeFromRequest
。 The server returns an InitializeFromResponse
holding an Entity
property in which you will find the prefilled attributes.服务器返回一个InitializeFromResponse
,其中包含一个Entity
属性,您将在其中找到预填充的属性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.