Fixes ISSUE-48341: Grid edit buttons disappear in some windows

The problem was only reproducible in grids where canvas field columns were displayed (i.e. Sales Order displays two by default, Delivery Status and Invoice Status). Those fields are managed by Smartclient as embeddedComponents and the area that contains the two buttons that disappear (OBGridButtonsComponent) is an embeddedComponent too. Whenever the user moves to a different row those components are recreated/recomputed (grid buttons here [1], canvas fields here [2]). Canvas fields are recomputed maintaining the row number they belong too, while grid buttons are recreated without a record number and rely on this smartclient function [3] to be assigned one. For that function to be executed, the first of the embedded components must have a null row number, so if there is a canvas field that happens to be the first component in the embeddedComponents array, the grid buttons component will not be assigned a row and thus will not be displayed.

Programatically assigning a row number on [1] when recomputing the grid buttons component does not work because [3] needs to be invoked (it sets a smartclient property that is not visible), so to fix the problem I am ensuring that when canvas fields are recomputed in [2], its row number is unset




Edited by Augusto Mauch

Merge request reports