How to remove the duplicate button in a form view?
In invoice form I program a automatic number but if I use the duplicate button I have identical invoice number. It is possible to gray out the duplicate number? Do I have to use role?
13 replies
-
You can hide the duplicate button using a formula field and then hide the formula field. Here's the code for trash, duplicate and add...
html("
<style>
.hud-menu-button.menu-icon.menu-icon-trash{display: none;}
.hud-menu-button.menu-icon.menu-icon-duplicate{display: none;}
.hud-menu-button.menu-icon.menu-icon-add{display: none;}
</style>
")
-
You are the greatest.
-
That doesn't work with multiple table and come back normaly with the duplicate button.
-
Yes, the hidden formula field should be on every form you use where the buttons must be hidden. You could also use a global function to prevent repeatedly typing the script and call that function on your forms in a hidden formula field.
Steven
-
Steven I try all that + a trigger after open in options menu and after a time the duplicata button came back.
-
a function like that
function rduplicatbutton(db: text)do
let db :=html("
<style>
.hud-menu-button.menu-icon.menu-icon-duplicate{display: none;}
</style>
")
end -
when I hide the formula field with display field only if (null) the button come back at the next refresh but if I leave the field without changing the statut "display field only if =null it work...
-
I find a way that work perfectly but I could use display field only if =null I have to use a differnet field for condition
-
Sorry my mistake, don't hide it, In stead You can style the formula field in a way it becomes invisible... (Background & text rgb 238 and hidden label)
-
Here's an example of an invisible formula field to hide the close form X (black background) :
Steven
-
and for the printer it is
.hud-menu-button.menu-icon.menu-icon-print{display: none;}
-
and for the printer it is
.hud-menu-button.menu-icon.menu-icon-print{display: none;}
-
Thank you steven everthing work great
Content aside
- 4 yrs agoLast active
- 13Replies
- 2884Views