Fetching field data which can then be editable in the fetched-to field?

Hello

Is it possible to fetch custom field data from one doctype to another and then have the new field be editable after submitting? For example, fetching some address information into a delivery note, but be able to edit that information if needed, even after submitting the delivery note … without having to cancel and amend etc.

Hi @CLV

Yes, it’s absolutely possible to fetch custom field data from one DocType to another in ERPNext. There are a few ways to do this, depending on your use case. Here are the most common methods:

  1. You can use Fetch from option if that source docytpe is available in your target doctype as a Link Field. Keep in mind header link records can be fetched into child table of target doctypes. This option allows you to fetch anything on Header of source doctype.

  2. On Header level; if the field name matches, same fields will capture data from source towards target doctype automatically.

Hello @ahsantareen
Many thanks for your reply. I am able to fetch the field data from one doctype to another using the ‘Fetch from’ option, but after the data is fetched into the target document, is there a way to then make that field editable?

Yes you can make that filed allow on submit to edit or update anytime after submission.

Thank you, I have tried that but it doesn’t seem to allow editing of the fetched information.

Please make sure the following check is off otherwise it will re fetch data from source field as soon as you press save button.

Hey,

You can make a client script for specific doctype like

frappe.call({
method:“frappe.client.get_list”,
args: {
doctype: “docname you want to fetch”,
fields: [“field_name”],
filters: {

Thank you, again, for the assistance - much appreciated.

I had initially set the type for the fetched field in the target doc as ‘data’ and even though I had checked ‘allow on submit’, it didn’t allow for the field to be edited. However, I changed it to a ‘link’ type and this has allowed for updating the information and populating related fields accordingly (the outcome I wanted) for the print format, even after submitting the document, and without having to go through the whole process of cancelling > amending > resubmitting the document (which, for just fixing a small mistake in the shipping address on the delivery note, as an example, seems a bit overkill at times!).