Boost Efficiency with Empress's `add_fetch` Method

Introduction

Welcome to this guide! Today, we’ll be discussing a feature in Empress that can make your business operations more efficient – Fetching Values From Master using the add_fetch method.

Introduction: What is the add_fetch Method?

In Empress, the add_fetch method is a simple yet powerful feature that enables you to quickly retrieve a specific value from a linked field when it is selected. This feature is designed to optimize your data management process, allowing for automatic updates and ensuring consistency across your system.

Key Concepts

Let’s break down the syntax of the add_fetch method for clarity:

add_fetch(link_fieldname, source_fieldname, target_fieldname)
  • link_fieldname: This refers to the name of the field that is linked.
  • source_fieldname: This is the name of the field from which you want to fetch a value.
  • target_fieldname: This is the name of the field where you want the fetched value to be populated.

Practical Application: Automating Value Updates

Imagine you have a Custom Field named VAT ID in your Customer and Sales Invoice sections. Every time you select a Customer for a Sales Invoice, you want the VAT ID from the selected Customer to automatically update in the Sales Invoice.

Here’s how you can use the add_fetch method to achieve this:

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

In this example:

  • ‘customer’ is the link_fieldname
  • The first ‘vat_id’ is the source_fieldname
  • The second ‘vat_id’ is the target_fieldname

With this setup, the VAT ID from the selected Customer will be automatically populated into the corresponding VAT ID field in the Sales Invoice every time you make a selection. This automatic data retrieval helps streamline your operations and reduce the potential for errors.

Conclusion: Enhancing Business Processes with the add_fetch Method

The add_fetch method in Empress is a game-changer for businesses. By allowing automatic data retrieval and updates, it can significantly enhance your data management processes, saving you time and reducing the chance of errors. As a result, you can focus more on your core business operations.

For further assistance with the add_fetch method or any other features in Empress, please refer to our user-friendly resources or get in touch with our support team.