Skip to content

🎯 Controlling Duplicate Entry Button in Merciglobal Cloud ERP

In Merciglobal Cloud ERP, the availability of the "Duplicate Entry" button in entry modules is determined by specific JavaScript configuration variables defined in the {project}.js file.

This guide helps developers and configurators understand how to manage this feature at both the global and module-specific levels.


🔧 Configuration Logic

There are two layers of control implemented through JavaScript variables:

1. Global Control Variable

sys_js_allow_entry_duplication = true;
  • If not declared or set to true, then the system checks for the next level of control (module-level).
  • If set to false, the Duplicate Entry button is completely hidden in all entry modules regardless of module-specific configurations.

2. Module-Specific Control Variable

sys_js_allow_entry_duplication_trn_sales = true;
  • Replace trn_sales with the actual table name or module identifier.
  • If not declared or set to true, the Duplicate Entry option is displayed in that particular module.
  • If set to false, the duplication feature is disabled only for that module.

🧠 Note: Always ensure naming consistency with module identifiers when defining module-level variables.


✅ Effective Combinations

Global Variable Module Variable Result
Not declared Not declared ✅ Duplicate button shown
true true ✅ Duplicate button shown
true false ❌ Duplicate button hidden
true Not declared ✅ Duplicate button shown
false Any value ❌ Duplicate button hidden
Not declared false ❌ Duplicate button hidden

📘 Developer Tips

  • Keep these variables organized at the top of your {project}.js for easy management.
  • For custom modules, use descriptive table/module names to avoid conflicts.
  • Use browser developer tools to inspect if the variables are correctly loaded and functioning.

🧩 Use Cases

  • Enable globally but restrict a few modules:

  • Set sys_js_allow_entry_duplication = true

  • Set specific modules like sys_js_allow_entry_duplication_trn_purchase = false

  • Disable entirely:

  • Set sys_js_allow_entry_duplication = false

  • No need to declare module-specific variables.

🔐 Permissions Reminder

While this JS variable-based control toggles the UI element, always ensure back-end validations are also in place for security and audit purposes.


🛠️ Summary

  • 🔄 Global toggle: sys_js_allow_entry_duplication
  • 📁 Module toggle: sys_js_allow_entry_duplication_{TABLENAME}
  • 🧩 Flexible per-module control
  • 🚫 Back-end validation recommended

🏷️ Used In: All entry modules across Merciglobal Cloud ERP.


For more internal development guidelines, refer to the Merciglobal Developer Handbook or contact the Merci DevOps team.