How do I create the dynamic link

I need to create dynamic link, so how can I create because the documentation does not seems to be helpful.

what do you exactly mean by dynamic link?

Here you go - Dynamic Link Fields.

The documentation is fine, but is there any way of creating dynamic links in python script between two documents?? Or do I have to do it with the Dynamic Links doctype or something? Or even access the linked documents in python?

Also I cant seem to find much documentation about Dynamic Links doctype usage. Only thing I can find is in the erpnext doctype list about what fields are there and what are neccessary

Dynamic Links are a type of field, like Date or Text. I’m not aware of any doctype called Dynamic Links. You set dynamic links in Python the same way you set any field. The link Umair posted explains how they work.

1 Like

Okay Im sorry about the confusion. Might have mixed Links and Dynamic Links.
What I am trying to do is get the Linked Items to a doctype. Like Purchase Orders are linked to a purchase receipt. I want to find the list of linked PR in PO or PO in PR.Those are defined as Link and not dynamic links in erpnext.

Links and Dynamic Links are both Fields. If you look at Purchase Receipts, there’s a field called “Purchase Order” inside each row of the items child table, where you can input the name of a Purchase Order document.

To find linked documents, you can use the frappe.get_list method and filter for documents that have links to your purchase order in this field.

Sorry. I must be out of my mind to write Links here. What I meant is Connections. We always see the Connections in UI redirecting to connected documents. I meant how do I make or search for the connected PO from PR or vice versa in python.

The connected document needs to have a field that points back to the linked doc. You can define all that in the Customize Form tool.