Doctype Connections

Hello @NCP and everyone,
I created custom doctype (letter list), which is used to fetch required fields from sales order doctype like customer name, address, etc. to create a letter. I need to link or show the connections in letter and sales order doctype. I also read some documentation regarding connections. As shown in following screenshot


how can i show connections in both doctype

Create a field of type “Link” with respectively the other doctype. The label of the field should be “doctype” with spaces being replaced by underscores. Label of Sales Invoice is going to be “sales_invoice”.

Add a forward and a backward link for each document and you should see the connections popping up.

Hi @Shraddha33,

Please examine the following ERPNext code for the Customer DocType.
erpnext/customer_dashboard.py at version-14 · frappe/erpnext · GitHub

The purpose of these “_dashboard.py” files is to help configure the Connections sections.

You can create your own, for your specific DocType. If the name of your DocType is “Letter List”, then you would create a file in your DocType’s directory named letter_list_dashboard.py

Use the example I shared to get you started. The “transactions” section is the one you care about. This will allow you to code links to Letter, Sales Order, etc.

can you show us an example please

hi @brian_pond
but i am using frappe cloud for hosting, so unable to create a file.
thanks for your response.

Hi @mars, can you please give an example to add

thanks in advance