Customizing Web Form

i am creating a web form called ticket which I duplicated from issue . This customer field automatically fetches the name of the user that is logged in after I hit the submit button .
I want to fetch the Service Level Agreement for that customer according to the Customer. By using frappe call i can fetch any service level agreement but i can’t get access according to the customer . Here i have hard coded to fetch a service Level Agreement .


frappe.ready(function() {{


def value_fetch():
    data = frappe.db.get_value("Service Level Agreement",filters={"entity":'Grant Plastics Ltd.'},fieldname=['name'])
    return data

If any one has experience on the .py file can you enlighten me on how I can achieve this ?

1 Like