Wouldn't it make more sense to update the workflow so that it doesn't show the button conditionally in the first place? To try and answer the question you asked, I believe you'd need to use the record.removeButton({ id: 'custpage_{yourbuttonid}' }); . However, I don't know what the id of a button created via workflow would be sourced.