ERPNext Conference 2019* ERPNext.com Blog

Get_value on child table failing with permission error


#1

I noticed in the recent updates some changes to get_value were made to prevent abuse of child table values through the api (https://github.com/frappe/frappe/pull/5311/commits/595929eb2432140a27dc262d4d78aca4ec5455c3).

However, since this update a custom script I have that calls get_value on a custom child table is failing with PermissionError. I’m logged in as Administrator with explicit permissions for the parent. Anyone know how to resolve this?

EDIT: Checked the tabDocType table and the child table has no parent. In fact, no DocTypes have parents… How do I resolve this?


When I try to query data from another DocType I get permission error
#2

Turns out you need to pass parent through as an argument when calling get_value.


#3

Good day sir, @DBoobis. May i know how did you do this? “Turns out you need to pass parent through as an argument when calling get_value”. I’m having the same error right now. I tried fetching a child table data to other doctype. Thank you in advance. :smiley: