I have
Doctype A
Field A1
Field A2
Field A3
Doctype B
Field B1
Field B2 (link) A1
Field B3
From doctypeb.js I want to access the A3 field of the doctype A
As I do?
I have
Doctype A
Field A1
Field A2
Field A3
Doctype B
Field B1
Field B2 (link) A1
Field B3
From doctypeb.js I want to access the A3 field of the doctype A
As I do?
you mean Link of DocType A
i.e. field B2 - DocType A link
If yes, then you can access all values of DocType A using field B2 (i.e link of A)
e.g.frappe.db.get_value("DocType A", "docname(field B2)", "field A3" )
OR
Simply use,
cur_frm.add_fetch("field B2", "field to fetch from A", "target field of B")