Button display issue

setTimeout(() => {
frm.remove_custom_button(‘Start’);
}, 10);

setTimeout(() => {
frm.toggle_display(‘Start’,true)
frm.remove_custom_button(‘End’);

In first line of code iam trying to hide ‘Start’ button.In second line of code I am trying to hide ‘End’
button(End is working) also trying display the removed ‘Start’ button, but its not working(Start).Instead frm.remove_custom_button(‘End’); i tried frm.fields_dict[‘Start’].wrapper.style.display = ‘block’;
this is also not working.Why?

hi, which part dont work

frm.toggle_display(‘Start’,true)

i have two buttons Start and End .When my page reload the first button is Start.Whan i click Start
the End button will show.If i click End button i want to hide End button also want to show The Start button again.For these steps i created a button ‘Start’ first .The code for ‘End’ button creation is also wrotted inside Start button creation code.So when i click Start button End button will appear also do other functionalities of Start button at last The Start button will disappearwhich is in this
setTimeout(() => {
frm.remove_custom_button(‘Start’);
}, 10);
then appear the End button and performs its functionalitis .Finally End button will disappear and again the Start button will appear.Which is done in
setTimeout(() => {
frm.toggle_display(‘Start’,true)
frm.remove_custom_button(‘End’);