How can I rename a Button in Erpnext, all my scripts only hide other buttons

Screenshot from 2023-10-13 17-04-31

I want to rename " Healthcare Services" to “Sessions”

@Hamzah1998 try this :
frm.custom_buttons["Healthcare Services"].text("Sessions")

2 Likes

thank you @bahaou
is that a client script?

yes js code. you can test it using console

thank you so much @bahaou, it has worked perfectly

hey, this script causes conflict with connections in the sales invoice

how come ?

Screenshot from 2023-10-23 15-46-26
those buttons disappear


and also those connections cannot function

@Hamzah1998 I don’t think the solution is causing this . we only changed the text of the button not it’s id nor functionality . do you have any errors in console ?

i disabled the script and the buttons that had vanished reappeared