Adding a link field into 1 doc and fetching the same result from another doctype into the one created

in doctype item , i added a field called item price and i linked it to Item Price Doctype
i want to show the rate in this field which is getting it from Item Price Doctype
i used to write before i guess Item Price.price_list_rate in options section
but seems it’s not working right now
any idea how to do so ?

Hello @AnthonyS,

In the options field just give the doctype name as shown in the above figure.

this what i’m getting the thing is i want to fetch in this field the item price from Item Price doctype , i don’t want to select an item

frappe.ui.form.on("[DOCTYPE]", {
	refresh: function(frm) {
		frm.add_fetch("[LINK FIELD]", "[SOURCE]", "[TARGET]");
1 Like

thanks again for your reply, i tested it, it’s not returning any value what i did is i want the item price to be shown in the item when you click on it also :
so i created a field in item doctype, called it item_price and of type link and in options i included Item Price (doctype).
and i used the code you shared above
frm.add_fetch(“item_price”, “price_list_rate”, “[TARGET]”)
as the target field i should create another field? in my case the LINK FIELD is same as TARGET so i put item_price i’m so confused because i don’t have as you had in your topic,
i didn’t have a new doctype that i created etc…

@AnthonyS You can use frappe call for this{
        if(r.message != undefined){

Hi @AnthonyS,
Try this in fetch from section of item_price field:
Hope it will help you.

Remove the square bracket and then you can try.

I am trying same but it was not workring
can u help me bro

Dear All,
I believe that i have the similar problem but i want to show the price list as a table in my Item details. There are no doctype showing which supports my request. any ideas? , below is my item page.