0
votes

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?

1

1 Answers

1
votes

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.