0

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?

13replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • Sean
    • Sean
    • 2 yrs ago
    • Reported - view

    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>
    ")

    Like
    • James Déraps
    • Cegep de jonquiere
    • James_Deraps.1
    • 2 yrs ago
    • Reported - view

    You are the greatest. 

    Like
    • James Déraps
    • Cegep de jonquiere
    • James_Deraps.1
    • 2 yrs ago
    • Reported - view

    That doesn't work with multiple table and come back normaly with the duplicate button.

    Like
  • 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

    Like
    • James Déraps
    • Cegep de jonquiere
    • James_Deraps.1
    • 2 yrs ago
    • Reported - view

    Steven I try all that + a trigger after open in options menu and after a time the duplicata button came back. 

    Like
    • James Déraps
    • Cegep de jonquiere
    • James_Deraps.1
    • 2 yrs ago
    • Reported - view

    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

    Like
    • James Déraps
    • Cegep de jonquiere
    • James_Deraps.1
    • 2 yrs ago
    • Reported - view

    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...

    Like
    • James Déraps
    • Cegep de jonquiere
    • James_Deraps.1
    • 2 yrs ago
    • Reported - view

    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

    Like
  • 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)

    Like
  • Here's an example of an invisible formula field to hide the close form X (black background) :

    https://ninoxdb.de/en/forum/use-cases-5abd0b9c4da2d77b6ebfa395/simple-log-in-system-with-datetime-registration.-5e11d00509d132371a594f5c

    Steven

    Like
    • James Déraps
    • Cegep de jonquiere
    • James_Deraps.1
    • 2 yrs ago
    • Reported - view

    and for the printer it is

    .hud-menu-button.menu-icon.menu-icon-print{display: none;}

    Like
    • James Déraps
    • Cegep de jonquiere
    • James_Deraps.1
    • 2 yrs ago
    • Reported - view

    and for the printer it is

    .hud-menu-button.menu-icon.menu-icon-print{display: none;}

    Like
    • James Déraps
    • Cegep de jonquiere
    • James_Deraps.1
    • 2 yrs ago
    • Reported - view

    Thank you steven everthing work great

    Like
Like Follow
  • 2 yrs agoLast active
  • 13Replies
  • 2716Views