Error: You do not have enough permissions to access this resource. Please contact your manager to get access

Hi ,

We are encountering the above mentioned error on a V12 instance while trying to fetch a custom child doctype via custom script. We have tried various suggestions found on the forum particularly here but still same!

When we replace the custom child doctype with a standard one, the script works

Any ideas on how to get around this will be greatly appreciated

Below is the code snippet:

frappe.ui.form.on("Sales Invoice",{
	get_delivery_notes: function(frm) {
	frappe.call({
			method: "frappe.client.get_list",
			args: {
			doctype: "Custom Child Doc",
			parent: "Sales Invoice",
			filters: [
				["parent", 'in', frm.doc.si_list],
				["docstatus", '=', 1]
			],
			fields: [
				"delivery_note",
			],
			limit_page_length: 0
			},
			callback: function(r) { 
			var rm = r.message;
			console.log(rm);
			}
		})
	}
})

Does anyone have any idea how to get around this please? I’ve tested even on the latest V13 and the problem is the same!

If you add a Custom Child DocType to a Standard Document (e.g. Sales Invoice), the get_list method returns an error (even with the ‘parent’ parameter defined in the arguments)

Any pointers will be greatly appreciated

Created a Github Issue:

Still hoping someone can suggest a workaround though…

Thanks