How to customize child table to render in html

In CRM Lead, the notes is a child table, but it’s rendered as shown below, how can I customize the child table to render like that

To implement a similar behaviour:

  • Use Client Script

  • Add an HTML field in your desired doctype

  • Fetch child table data using frappe.call

  • Render the desired HTML elements using frappe.render_template into the HTML field

  • To Handle edit actions use jQuery and sync changes back to the child table

To understand how this is implemented internally in ERPNext, refer to: erpnext/public/js/utils/crm_activities.js and lead.js file

These files handles custom rendering of CRM activities (including notes) and serves as a good reference for replicating the same pattern.

2 Likes

After a bit of hacking, looking at the files you suggested the implementation is done, thank you

1 Like

Glad to hear it helped.