How to Call Function written in Server Server Doctype by button created by Custom Scripts

Hi
i try to call a function that creates in Server Script Side
on do some action in button click on custom script
and search on many topics and can find how to do that

its keep saying can’t find function
frappe.listview_settings[‘Customer’] = {
onload: function (listview) {
listview.page.add_action_item((“Item Coding Request”), function (event) {
var selected_rows = listview.get_checked_items();
if (!selected_rows) {
frappe.msgprint(
(“Please select the customers to perform this action”));
return;
}

  var selected_customers = selected_rows.map(function (row) {
    return row.name;
  });

  frappe.call({

It keeps saying it can`t find the method I try to select the server script in Customer Doctype

    method: "custom_scripts.item_coding_request.login_to_marketplace",
    callback: function (response) {
      console.log(response);
      frappe.msgprint(response.message);
    }
  });
});

}
};

Hi @AI.Geek ,
Here mode_of_paymet is the custom button in doctype, when click it below function trigger.

mode_of_payment: function(frm) {
		frappe.xcall('your_app.utils.mode_of_payments.get_mode_of_payment_default_account',
			{
				mode_of_payment: frm.doc.mode_of_payment

			}).then((r) => {
				frm.set_value("paid_to",r)
		});
	},

Hope it will the right process you want to know.

Thanks for replay @saakib10
To be sure about this part
your_app.utils.mode_of_payments.get_mode_of_payment_default_account

Your_app : what should this value if I try to put button in customer doctype

In server script I will added to same doctype too
Is this write ?