Hide SAVE button within a Table record (submitted)

hi, have a Form with table data, i need to hide the Submit button within the table form, some users may read this table but won't be able to update records.

into the BO. object seems not to be reachable this button object, thanks in advance

Lea

PS : made a section with the table'fields and blocked it from typing, but need to hide the button

I am not sure what do you mean... how about this "No Buttons" option?

hi Jan, i need to hide / disable SAVE button within a rable record,

the users can read the main form, access the table records, can´t update fields (because they are into aprotected section), but the SAVE button remains.

Thanks

then you can use action.setVisible(false)

This should work:

var actionButtons = form.getStageActions();
for (var i = 0; i < actionButtons.length; i++) {
    if (get(actionButtons, i).getId() === 'S_MySaveBtn')
        get(actionButtons, i).setVisible(false);
}

hi, it seems you can't use

var actions = form.getStageActions();

within the table's events, only on form's events.

Thanks

thanks Jan, if i put this code into the table's Onshow event :

Maybe you could address the Save button in the table by simply hiding it via CSS?
I know that this is not a secure way, but better than nothing...

You could use Jan’s code to hide the button via the form’s “onShowActionButtons” event.

If you want/need to have the form submittable for certain user’s, you could then implement an own button anywhere on your form; this button can be addressed and thus be shown/hidden easily based on any condition you want to code, and in the button’s onClick event, click the hidden form action button via this code:

//... do something before submission

let actionButtons = form.getStageActions();
for(let i=0; i<actionButtons.length; i++){
  if(get(actionButtons, i).getId() === 'S_MySaveBtn')
     get(actionButtons, i).activate();
}

Other solution: go into the “Workflow view” of your form, and delete the submit button there (basically un-linking the “Start” and the “Submitted” stages). Then there is no save/submit button at all.