Avoid white space placeholder when hiding sub grid from entity form

Did you ever have a request to hide sub grids from entity form to keep it cleaner in some cases (eg. hide all empty sub grids)? The problem with this one is that if you just hide a sub grid it will still be shown as white space on the form and that’s probably not the way you want to do it.

The solution for this issue is to put each sub grid into a new section that will contain only one sub grid.

Below is an example how to hide all empty sub grids on entity form.

Hide all empty sub grids example

Place sub grid in a section element on form

First, you need to open “Form” editor and put each sub grid that you want to hide in separate section element. Grids that are supposed to be shown in all cases can remain positioned as usual.

Image 149.png

Upload JS file to Web Resources

Add new JS file Web Resource with the code shown below:

Add JS function for hiding sub grids on OnLoad event

You need to open “Form Properties” window and start adding stuff. Firstly you need to add JS file on the form (steps 1 and 2). After that, you need to set Control to Form and Event to OnLoad  (step 3). Finally, you need to add OnLoad event by pressing plus sign and set Library to JS file you added in the first 2 steps and name of the function from the JS file (in this example name of the function is hideEmptySubgrids).

Image 150.png

Final result

Image 151.png

Image 152.png

Ribbon suddenly​ disappears. What to do?

“My ribbon suddenly disappeared! Fix it as soon as possible.” -Angry Customer

If you spent your time customizing the ribbons on your entities you probably faced this issue, but there are not so many threads on the Web that are explaining this issue.

Most of the suggestions out there pointing you in the wrong direction, but will probably not lead you to the successful solution.

The answer is so simple and if you ask me very stupid. Your problem in the most cases will be just one field that you fill on button properties in your Ribbon Workbench. Maybe most of you had a dumb habit to copy-paste button label to most of the label/description/tooltip fields and thought that it’s the fastest and the best solution when creating the new button on the ribbon, but that’s what caused the issue.

ribbon_wb_stop

The key to success is in the “Tool Tip Desciption” text field that is probably filled by accident of just for a no clear reason. When you remove all the characters that you entered in this field your ribbon will not disappear anymore and from now on you will never fill every single field that you thought will be nice to not leave empty.

Tip of the day after you had this issue will be to keep the things as simple and as stupid as they are in general, you don’t need to fill every single field in there only because you think it will be much better that way. Think every time before you enter some information do you really need to type it or will it really help users in general.

P.S. Most of the users will never read your tooltips so don’t type in the description for it 😀