When I create a new webform I want to map with some data.
I followed the code here from this tutorial:
https://www.youtube.com/watch?v=c7b4cX8maI8&list=PL3lFfCEoMxvzHtsZHFJ4T3n5yMM3nGJ1W&index=12
min 9:22
And this is my code:
def get_context(context):
# do your magic here
comp = frappe.get_value(doctype="Customer",
filters={"name": frappe.session.user},
fieldname=["name"])
frappe.form_dict.name = comp
frappe.form_dict.new = 0
context.doc = frappe.get_doc("Customer", comp)
When I enter Hardcoded name on Filters it returns success, but when I enter frappe.session.user
it return this error:
Page missing or removed
BUT, when I try on WWW folder frappe.session.user
, it works perfectly.
Any idea why it is giving me this error?