简体   繁体   English

Dynamics CRM 2011:“创建新”表单中字段的扩展查找

[英]Dynamics CRM 2011: Extended lookup for a field in “Create New” form

I have the following scenario: 我有以下情况:

A user wants to create a new record of entity CustomEntity1. 用户想要创建实体CustomEntity1的新记录。 One of the fields on the "Create New" form is a reference to the entity of type CustomEntity2. “新建”表单上的字段之一是对CustomEntity2类型的实体的引用。

Now, there is a built in lookup where thety can search by name, or filter the options to a predefined view. 现在,有一个内置的查找,thety可以按名称搜索或将选项过滤到预定义的视图。 This doesn't help, because the user needs to get the name (or names) of CustomEntity2 which satisfies a set of criteria based on the fields in CustomEntity2. 这无济于事,因为用户需要获得CustomEntity2的名称(一个或多个),该名称满足基于CustomEntity2中的字段的一组条件。

Is there a way to incorporate this in "Create New" form for CustomEntity1? 是否可以在CustomEntity1的“新建”表单中合并此方法?

And the question again, a bit less abstract: 再来一个问题,抽象性稍差一些:

The user needs to create a new record of type CustomerAccount . 用户需要创建一个类型为CustomerAccount的新记录。 In doing this he/she needs to fill a field called Group . 为此,他/她需要填写一个名为Group的字段。 This should be looked up in a list of existing groups , based on several criteria - Type , Region , Budget and so on. 应该根据几个标准( 类型区域预算等)在现有的列表中进行查找。 Is there a way for the user to enter this criteria while creating the new record, and not go separately to the list of Groups and run a report to find the candidates? 用户是否可以在创建新记录时输入此条件,而不是单独进入“组”列表并运行报告以查找候选人?

You can use the addCustomView method of the lookup control to filter the options based on the fetchXML and layoutXML that you provide. 您可以使用查找控件addCustomView方法根据您提供的fetchXMLlayoutXML筛选选项。

One way to supply the right conditions to your custom fetchXML is to duplicate the Type , Region , and Budget fields in the CustomerAccount form, so that when the lookup dialog is opened, it filters the existing Groups based on the values you've selected in the CustomerAccount form. 为自定义fetchXML提供正确条件的一种方法是,复制CustomerAccount表单中的TypeRegionBudget字段,以便在打开查找对话框时,它会根据您在其中选择的值来过滤现有的GroupsCustomerAccount表单。

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

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