Tuesday, July 5, 2016

Custom Script-Get Values from Server

To fetch value from server use frappe.client.get_value


frappe.call({
            "method": "frappe.client.get_value",
            args: {
                doctype: "ToDo",
                fieldname: 'name',
                filters: { reference_name: frm.doc.name },
            },
            callback: function (r) {
             alert(r.message.name)

            }});

2 comments:

  1. what is meaning of fieldname in args and callback

    ReplyDelete
  2. i want to add filter for start date and end date so that i get details between two specific dates.
    currently i am getting details for 365 days

    ReplyDelete