Hi all,
I need to print all the comments made in the docType for example 'Project`.
How to print it using the print format.
I have created a custom print format but I couldn’t load comments yet!
I tried to load all the comments mad in that document from Communication doctype.
Anybody knows this?
1 Like
please share your code to help you
You can try this:
{% set comments = frappe.get_list('Communication', fields=['content', 'user'], filters={'reference_name': doc.name}) %} {% for com in comments if com.content != None %} User: {{com.user}}<br> Comment: {{com.content}} {% endfor %}
3 Likes
@Mohammed_Redha Thanks for the reply
I was trying with frappe.db.get_value()
But it returns only one row
@hendrik_zeta
It works!!! Thank you so much…