Wednesday, June 10, 2015

Sub-grid Add("+") Button Behaviour

If you have any doubt in the post please post comments. I will try to solve your problem.

When you click add button in the sub grid. Mostly there are two possiblities

1) Open main/quick create form(depend upon "Allow quick create" check box config in the entity).
2)  Open look-up for existing record along with New at the bottom of the lookup.
Here credit card custom entity and has 1:N relationship for account.
In credit card form account is not mandatory we can leave it empty and can later associate it with an account using the Add Existing/Lookup feature on the Credit card Sub-grid.

If you want to disable Add Existing feature and always be forced to create a new record to associate with the Account, we only need to make the Customer account as mandatory in credit card entity
 (Refer below, Steps to make the Entity Field Mandatory).

Now, when we try to add a Credit card for the Account we will get a Main/Quick Create Form instead of a lookup. 
The reason is, while entering data for the new credit card the customer account is mandatory as a result any new Credit card that will be created will have a Customer Account associated with it.




No comments:

Post a Comment

Note: Only a member of this blog may post a comment.