Need Help on fetching child item table

I am using the below code on custom button on Delivery Note to create a new doc in a custom doctype.
@frappe.whitelist()
def make_new_inward(source_name, target_doc=None):
doclist = get_mapped_doc(“Delivery Note”, source_name, {
“Delivery Note”: {
“doctype”: “Inward”,
“field_map”: {
“name”: “delivery_note”
},
“validation”: {
“docstatus”: [“=”, 0]
}
}
}, target_doc)
return doclist

The code fetches all details in the child table except the “Rate” field.
It would be really helpful if anyone can help me in fixing this.

Check the field name of the rate field, it should be same in both doc types, then it would fetch automatically

@Pawan
Just checked the field names are matching in both the doctypes.

Also, we recently migrated to V8, the same code was working fine in V7 but stopped since the update.

Try as below

doclist = get_mapped_doc("Delivery Note", source_name, {
	"Delivery Note": {
		"doctype": "Inward",
		"field_map": {
			"name": "delivery_note"
		}
	},
	"Child Table Doctype": {
		"doctype": "Child Table Doc Type",
		"field_map": {
			"field1": "field2"
		}
	}
}, target_doc)

@Pawan nope, still rate field value not getting fetched.