Skip to content

Hide Email Icon in List View – Merciglobal Cloud ERP

This documentation explains how to hide the Email icon from the List View in Merciglobal Cloud ERP by inserting a concise JavaScript function into the project_core.js file.


Purpose

Improve the user interface by removing unnecessary or unused icons in the List View. This method specifically targets the Email icon, using a simple conditional function.


File Location

Ensure the function below is included inside the project_core.js file within your Merciglobal Cloud ERP project.


JavaScript Function

/**
 * Function to control visibility of icons in list view
 * Currently hides the EMAIL icon
 *
 * @param {string} icon - Icon identifier
 * @returns {boolean} - Whether to show the icon or not
 */
function trn_saleinv_showicon(icon = '') {
    if (icon.toUpperCase() === 'EMAIL') {
        return false; // ❌ Hides the EMAIL icon
    }
    return true; // ✅ Show all other icons
}

How It Works

  • 🔍 Checks if the icon type is EMAIL
  • 🛑 Returns false if it matches, which prevents the system from rendering the icon
  • ✅ Returns true for all other icons, allowing them to display normally

Use Case

Ideal for modules where emailing directly from the list view is not required, or for streamlining the interface based on specific user roles or departments.


👨‍💻 Target Audience

  • 🧑‍💼 Sales Team: Cleaner interface with only relevant icons displayed
  • 🧑‍🔧 Developers: Simple and flexible customization
  • 🧑‍💻 Merci Internal Team: Enhances user experience with minimal changes

Additional Notes

  • The function can be extended to hide additional icons by adding more conditions
  • Useful for creating a minimalistic, role-specific UI

🔄 Next Steps

  1. Deploy the updated project_core.js
  2. Test across relevant modules to confirm icon visibility behavior
  3. Enhance logic for role-based or condition-based icon control if required

For further customizations or assistance, contact the Merciglobal ERP Development Team.

Happy Customizing! 🎯