Copy some fields from a doctype to another doctype with custom button

I am trying to replicate a functionality that is in the module buying => Request for Quotation that makes a copy of a doctype to another of information that is already saved, I have 2 days but none works for me, could give me an orientation to solve this problem :
Current Code:
frappe.ui.form.on (‘Student Group’, {
refresh: function (frm) {
frm.add_custom_button (__ (‘Period 1’),
function () {
erpnext.utils.map_current_doc ({
“method”: “frappe.client.set_value”,
“args”: {
“doctype”: “Item”,
“name”: frm.doc.item,
“fieldname”: [“workflow_state”],
“value”: frm.doc.status
}
})
}, __(“Copy”));
}
});