Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

Printing time line

Hi,

ANy one know how to print timeline in prnt format?

Thanks,
BObby

@bobzz_zone

{% set timeline = frappe.get_all("Communication", fields="*", filters={"reference_doctype": doctype, "reference_name": doc.name}, order_by="creation desc") %}

{% for row in timeline %}
<-- your html template goes here -->
{% endfor %}

that was awesome… but can you advice me with one more thing… i need to get the date to be formatted…

Thanks

@bobzz_zone

{{ frappe.utils.format_date(row.datefield) }}
1 Like

great… thanks bud… :slight_smile:

As I am new to frappe can you please tell we where to write the above code to print the timeline.
PS-Thanks in advance

@ASHISH_JHA, in any “Print Format”

https://docs.erpnext.com/docs/user/manual/en/customize-erpnext/print-format

1 Like

Thanks for the quick reply.This is very helpful.
I just need to ask you one more question- is there any way to make the comments in the timeline non-editable.
PS-again thanks in advance

@ASHISH_JHA, no comments are made to be editable, but communications like “Email, SMSs and Call logs” arent editable.

In the past ERPNext was able to let you create different entries in the Email Dialog, but this feature have been removed since v12

1 Like

Thank you mate.