Skip to main content

Due to performance reasons, we have created some views on top of some main tables and linked them to the original table.

From the grid (view) we show in the detail screen the form of the table itself.
But then the add button is disabled.
For the table itself the Add options are enabled in the subject settings.

Also in the layout procedure we don't manipulate the @add_button_type and it is parsed with value 0
I think this is because of the 1:1 relation between the gridview and the table itself.

How to enable the default Add button?


 

When you would add a record to the view, the UI would not know how to navigate to the newly added record. It does not know that the record in the view and the parent table are logically the same entity.

You can circumvent this but it is a bity tricky.

First, you’ll need to trick the UI into thinking it is not a 1:1 relationship. You can do this by adding an arbitrary primary key column to the view, e.g. extra_id with value 1 and default value 1.

Now, you will be able to add records but when you add a record it will disappear with a message saying that the added row cannot be found.

You can resolve this using a process flow that navigates the parent table to the newly added row.