How to set order by descending on frappe call?

Hello,

Is it possible to set order by desc on frappe call argument?

Code is:
frappe.call({
method: “frappe.client.get_list”,
args: {
doctype: ‘Item’,
fields: [“name”],
filters: [
[“name”, “like”, ‘Item1’ + “%”]
],
order_by: “name”
},
callback: function (r) {
}
});

Thanks,

1 Like
frappe.call({
                    method: "frappe.client.get_list",
                    async:false,
                    args: {
                        "doctype": "Project Item Date Price",
                        "filters": {
                            'docstatus':["!=",2],
                        },
                        fields: ['rate', 'gst_rate', 'date','name'],
                        order_by: 'date desc',
                        limit_page_length:1
                    },
                    callback: function (r) {
                     }
                });
2 Likes

Thanks, it is working.:smiley:

1 Like