How to tick/untick "create" checkbox of a role in "Roles Permissions Manager"?

how to tick/untick “create” checkbox of a role such as “website user” in “Roles Permissions Manager” via a single doctype such as settings?

Hope new year brings joy and happiness to you all,
@avc @ejaaz , can you guide please

Hi @Rebaz_Balisani

What you’re trying to accomplish is Field permissions.

This document may help:
https://docs.frappe.io/erpnext/user/manual/en/changing-the-properties-of-a-field-based-on-role

for this you will have to write some script

  1. Write a client script on change of checkbox in your custom_single_doctype.js file
frappe.ui.form.on("Your Single Doctype Settings Name", {
	field_name: function (frm) {
		frm.call({
			module: "frappe.core",
            page: "permission_manager",
            method: "update",
			freeze: true,
			args: {
				parent: "Membership Form",
				role: "Website User",
				ptype: "create",
				value: frm.doc.field_name,
			},
			callback: () => {
				frappe.dom.unfreeze();
				// show some message if required
				frappe.msgprint(__("Attendance has been marked as per employee check-ins"));
			},
		});
	},
});