简体   繁体   English

Dynamics CRM 2011中的链接选项集

[英]Link Option Sets in Dynamics CRM 2011

I am trying to create linked Option Sets in some contract forms to allow for a main type and multiple subtypes specific to each main type in the first option set. 我正在尝试以某些合同形式创建链接的选项集,以允许第一个选项集中的主要类型和特定于每个主要类型的多个子类型。 This does not seem to have functionality without some coding. 没有一些编码,这似乎没有功能。

Abstract Ex: 摘要:

Main Type Table: {A, B, C, ...} 主要类型表:{A,B,C,...}

Subtype Tables: {A1, A2, A3, ...} , {B1, B2, B3, ...} 子类型表:{A1,A2,A3,...},{B1,B2,B3,...}

I would like to create an option set that dynamically changes once a main type is selected, but don't know where to start with writing the code. 我想创建一个选项集,一旦选择了主要类型,它就会动态更改,但不知道从哪里开始编写代码。

You will need to write some code, yes. 您将需要编写一些代码,是的。 I wrote this blog article for version 4, but it might give you some pointers for version 2011. 我为第4版撰写了此博客文章 ,但可能会为您提供有关2011版的一些建议。

Fundamentally, you will be writing a JScript web resource which: - contains a handler (function) hides or removes values from your "Subtype" picklist, if the record has no value in that field. 从根本上讲,您将编写一个JScript Web资源,该资源:-如果该字段中的记录没有值,则包含一个处理程序(函数),该处理程序可从“子类型”选择列表中隐藏或删除值。 This should be registered against the form's onLoad event handler - contains a handler (function) that can be registered against the onChange event handler of your "Main Type" picklist that will look at the newly selected value and filter/populate your "Subtype" picklist as appropriate 这应该针对表单的onLoad事件处理程序进行注册-包含可以针对您的“主要类型”选择列表的onChange事件处理程序注册的处理程序(函数),该处理程序将查看新选择的值并过滤/填充“子类型”选择列表作为适当的

If writing clientside JScript code for CRM 2011 is unfamiliar to you, then you should review the appropriate part of the SDK . 如果您不熟悉CRM 2011的客户端JScript代码编写,那么您应该查看SDK的相应部分

Add an OnChange event to the MainType dropdown, and then perform an Odata Rest call to populate the values in the subtype. 将一个OnChange事件添加到MainType下拉列表中,然后执行Odata Rest调用以填充子类型中的值。

What part do you need help with? 您需要什么帮助?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM