Efficient Workflow: Renaming Buttons in Empress' Sales Order

Introduction

Welcome to this user-friendly guide on how to customize button names in a submitted Sales Order on the Empress platform. In this guide, we will walk you through renaming these buttons to align with your specific business processes, thereby enhancing your operational efficiency.

Introduction: Understanding the Significance of Customizing Button Names

When you explore a submitted Sales Order on the Empress platform, you will notice several options under the ‘Create’ button. These buttons are designed to provide you with quick access to various functions. However, not all these options may be relevant to your everyday business operations.

Empress understands that every business is unique. Hence, it allows you to rename these button options to reflect your specific needs. This customization can help you streamline your workflow by removing unnecessary buttons and renaming those that are more frequently used.

Step-by-Step Guide: Renaming Button Names Using Custom Script

To customize these button names, we will use a simple custom script. Please follow the steps below:

  1. Access the Empress script editor.
  2. Paste the following custom script:
Empress.ui.form.on('Sales Order', {
    on_submit: function(frm){
        location.reload()
    },
    onload_post_render: function(frm){
        var bt = ['Delivery', 'Work Order', 'Invoice', 'Material Request', 'Request for Raw Materials', 'Purchase Order', 'Payment Request', 'Payment', 'Project', 'Subscription']
        bt.forEach(function(bt){
            frm.page.remove_inner_button(bt, 'Create')
            });
        frm.page.add_inner_button('Order Raw Materials', () => cur_frm.cscript.make_raw_material_request(), 'Create')
        }
    }
);

This script will first remove the unnecessary buttons from the interface. Then, it will rename the ‘Request for Raw Materials’ button to ‘Order Raw Materials’.

Note: This script is built on the JavaScript APIs of the Empress platform.

Understanding the Functions of Renamed Buttons

When you rename a button, you should understand the function it performs when clicked. This requires identifying the method being called when the button is clicked.

For example, in the script we used, we renamed the ‘Request For Raw Materials’ button. The method this button calls when clicked is specified in a specific line of code in the JavaScript file associated with the ‘Sales Order’ form.

Conclusion: Enhancing Business Processes with Customized Button Names

Customizing button names in Empress’ Sales Order form can make your workspace more efficient and user-friendly. By aligning the interface closely with your business needs, Empress helps you manage your operations more effectively.

For further assistance or queries, please don’t hesitate to reach out to our support team. Enjoy harnessing the flexibility and power of the Empress platform for your business!