Dynamics 365 sub-grid add new and add existing
In Dynamics 365, if you put a sub-grid to display related records in a parent, there is always a plus (+) sign to allow user either adding a new child record or an existing record. The default behavior when user clicks the plus (+) sign is to display a lookup box, user can then click the lookup to drop down a list of child records or click the New button at the bottom of the drop down list. However, sometimes we may want to force the plus (+) sign to open the new record form straight away without displaying the lookup drop down to users. For example, we have a parent entity called Project, which is a custom entity. And we create a second custom entity called Service Contract, which has N to 1 relationship to Project. The project form looks like below. For the purpose of the demo, we say the requirement is to always open the new service contract form when user clicks the plus (+) sign. The easiest way to do this is to change the Project lookup field in the Service Con...