ROOM64 / KNOWLEDGE / ERPNEXT

Fetching Values From Master

To pull a value of a link on selection, use the add_fetch method.

อ่านต้นฉบับที่ ERPNext Official Docs ↗
เอกสารอ้างอิงภาษาอังกฤษเนื้อหาจากเอกสาร ERPNext คงรายละเอียดและโค้ดตามต้นฉบับ · ต้นฉบับอัปเดต 2026-03-02 ชื่อเมนูและ DocType ที่ใช้ได้ขึ้นอยู่กับเวอร์ชันและรุ่นที่ทีมใช้งาน

Projects · โครงการและงานบริการ · Fetching Values From Master

สารบัญในหน้านี้

To pull a value of a link on selection, use the add_fetch method.

add_fetch(link_fieldname, source_fieldname, target_fieldname)

Example

Let' say you have created a Custom Field VAT ID (vat_id ) in Customer and Sales Invoice and want to make sure that this value gets updated every time you select a Customer in a Sales Invoice.

To configure this, in the Sales Invoice Custom Script, you can add this line:

cur_frm.add_fetch('customer','vat_id','vat_id')

เนื้อหาเอกสารอ้างอิงและภาพประกอบมาจาก ERPNext / Frappe Official Docs · บทความแนะนำภาษาไทยเรียบเรียงโดย Room64 · เว็บไซต์นี้เป็นคู่มือประกอบการใช้งานโดย Room64 · เอกสารทางการ ↗

มีงานที่อยากให้ Software, AI หรือ Automation ช่วยอยู่ไหม?

เล่า workflow หรือปัญหาที่ทีมกำลังเจอ เราช่วยดูได้ว่าควรใช้ระบบสำเร็จรูป เชื่อมเครื่องมือเดิม หรือพัฒนาเพิ่มเฉพาะส่วนไหน

คุยกับเราทาง LINEhello@room64.net