How to select data from linked doctype?

Hi,
I have a little problem in Account DocType , In Creating New Account , user choose parent account which is a link to Account doctype , I want to display the shown number field for the chosen Parent Account ,
i tried to give it in option parent_account.shown_number
now that should show it , but it dosn’t work !

now i’m trying to change in account_tree.js the name field like this :

fields: [
	{fieldtype:'Data', fieldname:'parent_account_number', label:__('Parent Account Number'),default:"I WANT TO RUN SQL QUERY TO GET  chosen PARENT account SHOWN_NUMBER"}

]

You will have to write a custom onchage event in JS to catch this and set the value in the modal (Dialog). What you want is not available out of the box.

2 Likes