The Quick Create Forms introduced in Dynamics CRM 2013 are very helpful in capturing the required information for a record without navigating away from the current screen. The Quick Create button is available in the Navigation Bar, thereby allowing the user to click it from anywhere in CRM. The Quick Create form opens without overtaking the current window. From CRM, the user can now open the quick create form from the Create button in the Navigation bar (as shown below) or the New button available in the lookup search from sub grids, provided of course, that the entity is configured for Quick Create.
Opening a Quick Create Form from the sub grid is very useful as it does not disturb the current window while allowing the user to add a new record. However, to do so the user must to click in the + sign above the sub grid and then click on New. To reduce the number of clicks CRM can be configured to open the quick create form directly on the click of the + sign!
For example, consider two entities named Parent and Child with an 1:N relationship between them. The parent entity form has a sub grid of the child entity. On click of the + sign in the sub grid we will configure CRM to open the Child quick create directly.
There are three possible ways to accomplish this:
Make the parent lookup a required field
In the child entity set the parent lookup’s Field Requirement to Business Required. Now if you press the + sign in the sub grid on the parent form the child quick create form opens up as shown below
The reason this is happening is because the + button in the sub grid is a combination of the Add Existing and Add New button. If the parent look up is mandatory on the child form the functionality for add existing will not be invoked as CRM assumes all the child records will have an associated parent and so it will directly call the add new functionality.
Hide the Add Existing button for all entities
If for some business related reason the parent lookup field in the child entity cannot be made mandatory, then the quick create form can be opened from the sub grid by customizing the sub grid ribbon as shown below. For convenience Ribbon Workbench is used here, but it can also be achieved by changing the customizations.xml file of the solution containing the child entity. Open the child entity in Ribbon Workbench and right click on the Add Existing button and press Hide Button. After publishing the solution try clicking the + sign in the child sub grid, it will open the Quick Create Form.
Hide the Add Existing button for a single entity
The above change will affect all the current and future child entity sub grids added on any CRM forms. If the above functionality has to be achieved for a specific entity it can be very easily achieved by adding a Display Rule to the Add Existing button on the Child Entity Sub Grid. The display rule will contain a FormEntityContextRule as shown below. This will open the Child Entity quick create form only from the sub grid on the Parent Entity form and not others.
There you have it! You are now full of CRM mastery! To become even more of a Dynamics CRM genius, head over to our main blog page for all sorts of wonderful CRM training and information!