ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Pass field value to Stock Entry Detail


I want to pass field value from “Material Request”:“m_cost_center” to “Stock Entry Detail”:“cost_center” using client custom script (Stock Entry Detail doctype) but it is not working.

cur_frm.add_fetch(“material_request”, “m_cost_center”, “cost_center”);

I need some help, thanks.


cur_frm.add_fetch("[LINK FIELD]", “[SOURCE]”, “[TARGET]”);
cur_frm.add_fetch(“item_code”, “m_cost_center”, “cost_center”);

Check this Custom script - fetch data