简体   繁体   中英

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. One of the fields on the "Create New" form is a reference to the entity of type CustomEntity2.

Now, there is a built in lookup where thety can search by name, or filter the options to a predefined view. 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.

Is there a way to incorporate this in "Create New" form for CustomEntity1?

And the question again, a bit less abstract:

The user needs to create a new record of type CustomerAccount . In doing this he/she needs to fill a field called 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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