How to change default value of options of link field

Hi,

would like to show other field instead of name in the link field of form or doctype

what i done so far is

var program = [
{“label”: “name”, “value”: “department”}]

cur_frm.set_df_property(“department”, “options”, “Program”);

but i get error

DocType [{“label”:“name”,“value”:“department”}] not found
The resource you are looking for is not available

what i want to do is show other data instead of name and id

please help me

i tried to do what i found in the below link

thanks

Instead of Program in the options add doctype name

@rohit_w okey now i get other doctype’s details in the link but i want to show other data’s instead of default value

this is what i get now i want to get some other details like name,creation

I think that you need something like this:

@mibrahim how yes it is that i want to do

but is there any way that i can fill the link programatically

Fill the link with what?

Go for:

Put the field name u want to display in title field in the doctype def

2 Likes

@mibrahim sorry i mean on server side that is using python not with js

@JoEz thanks for the link this what i wanted thanks a lot:slight_smile:

This answer has worked for me. Thank you for your contribution.