Try ERPNext Buy Support Partners Foundation

How to fetch Data from one DocType to another DocType?

I have created a new DocType, some of fields are filled manually but some should be fetched from other DocType, e.g like first name to member

have linked the field and doctype but while fetching first name & last name is not fetched

Have a look at this https://github.com/frappe/frappe/wiki/(Client-Side-Scripting)Fetch-values-from-another-document

@nikzz nikzz
tried but that also not working

it should not be doctype name “LibraryMember” but the field name ‘library_member’ in add_fetch

Screenshot%20from%202019-01-07%2013-31-24
like this
so whenever Library member is call this script will called in bank end?

One more LibraryMember to replace. Before the function. And it should be alright. That place is for the field name or the event name. Check out Frappe Hooks

Formatting tip : To format your code, simply copy and paste and enclose your code in this

```
[your_code_here]
```

@root13F
Screenshot%20from%202019-01-07%2014-06-03

tried that also it seem that it is not working

can anyone suggest some good tutorials for erpnext except there official docs

alright, replace library_member by refresh, in the place before the function

1 Like

@root13F thanks it worked

Could you please post the code that worked? Thank you :slight_smile:

1 Like

@Nadia
Screenshot%20from%202019-01-28%2016-28-15

1 Like

thanks :smile: