How to Print all comments

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':}) %} {% for com in comments if com.content != None %} User: {{com.user}}<br> Comment: {{com.content}} {% endfor %}


@Mohammed_Redha Thanks for the reply

I was trying with frappe.db.get_value()
But it returns only one row


It works!!! Thank you so much…