Frappe call to get sum of a field

i am farely new in frappe

i added a custom field in task ‘quantity’ . now i want to get sum (quantity) from ‘Task’ whose parent_task=frm.doc.parent_task

how do i write frappe call in task.js

and is it possible to code frappe call inside callback function?

Thanks,

read this link

https://frappe.io/docs/user/en/guides/basics/frappe_ajax_call

Hey @abrarpv97, have you found a solution to your query? If yes, please share it so that this information can be publicly documented for your own and anyone else searching for an answer.