How do i give permission to this document to user


I have a custom doctype where on a basis of a ID i am fetching sales Invoice and Delivery Note ID.
And i don’t find anything in Role Permission manager.

Hi,

Normally frappe.db.sql will not work on child table from client script.

Work around is that, you define this as function on server side and call that function from client script to accomplish the same.

Thanks,

Divyesh Mangroliya

@mangroliya
I have added a client script where i am using “Sales invoice item” and “Delivery note item”

how should i handle this…

@mangroliya ???

Hi,

Solution is writing the part of your script which uses frappe.db.get_list as a function on server side.

You need to add whitelisted function in .py file on server side and call that function in your client script via doted path.

Below is the example, how you can call the method (get_contact_details) in your js file:

The same function is defined on server side as follows:

Thanks,

Divyesh Mangroliya

@mangroliya Thanks…