Hi,
I am developing a new extension for Business Central and I have found a problem while creating a new window.
I have created a new window of type ListPlus in which I have three fields in a group and a ListPart below in which I insert some data.
The window works fine, my problem is with the button in the upper part named View which I cannot hide/remove. I have tried with the properties InsertAllowed, DeleteAllowed and ModifyAllowed but the button still appears.
The main problem is that if the action is clicked, the ListPart is uneditable and it doesn´t seem to be very user friendly, because it cannot be reverted again (in the following image it can be seen that the lines are grey and uneditable).
Without the action, the window would behave perfectly.
Some considerations, I haven´t defined any SourceTable and the action is performed in the trigger OnQueryClosePage of the page.
Possible problem 2 (if the upper part cannot be solved)
While I was searching for a solution, I have tried using another PageType => Worksheet which does not show the View button BUT the problem here is that the lines are defined as a ListPart and due to Layout management, it only shows 4 lines even if there are more lines. Reading the documentation it seems impossible to show more lines in this ListPart. As you can see in the image, there is no action but the ListPart only shows 5 lines, a scrollbar and a lot of empty space.
A possible solution would be to move the repeater from the ListPart to the Worksheet page but it is used in more than one page and it is "quite" complex, it has lots of comprobations and the ListPart alone are 400 hundred code lines more or less. I guess that if there is no other solution I will do move the repeater, but I hope that there must be a way of hiding/removing that button.
Kind regards and thank you for your time,