Custom button script

frappe.ui.form.on(“test”, {
refresh: function(frm) {
var me = this
if(!frm.doc.__islocal) {
cur_frm.add_custom_button(_(‘button1’), function() {
//cur_frm.cscript.make_ferro_order()
cur_frm.add_fetch(“test”, “open_ticket_date”, “open_ticket_date”)
});
}
}

I tried this but I found nothing in the screen the button name is button1 and not linked in options, when I remove this code the screen appear again