What is the Issue?
When you click on + Button on subgrid ,sometimes it opens new record and sometimes behaves like add existing by opening search box for existing records.
The Reason –
This behaviour of + button depends on the association between the entities. Adding new record will strictly associates records and add existing will allow you to associate records if required.
Solution-
To change the behaviour of the + button you need to change requirement level of the lookup field of the entity on which you have subgrid i.e. parent entity.
For example- you have 2 entities – AEntity and BEntity.
AEntity contains subgrid of BEntity.
On BEntity form we have lookup field- AEntityLookup
Now behaviour will be decided on requirement level of AEntityLookup field.
1. If requirement level : Business Required
Then it will behave as Add new record of BEntity.
This will also change behaviour of record level delete button as record delete.
2. If requirement level : optional/business recommended
Then it will behave as Add Existing record of BEntity.
This will also change behaviour of record level delete button as record remove.
Try it..
Happy coding…!!!