Skip to content

${table}_listview_rendered() Hook in Merciglobal Cloud ERP

Overview

The ${table}_listview_rendered() is a custom JavaScript hook in Merciglobal Cloud ERP, designed to enhance or manipulate UI behavior after a list view has been completely rendered for a specific table.

This powerful hook empowers Merci developers to:

  • Modify DOM elements post-render πŸ“œ
  • Add custom styles, icons, or tooltips 🎨
  • Bind custom click actions or inject dynamic content βš™οΈ

When to Use

Leverage the ${table}_listview_rendered() function when you aim to:

  • Inject custom HTML elements or buttons into table rows
  • Alter row background color based on field values
  • Display dynamic data not available in the initial database query
  • Control actions based on user permissions or record statuses

Function Signature

function ${table}_listview_rendered() {
    // Your logic here
}

Example: Highlight Inactive Customers

For the customer table, to highlight inactive rows:

function trn_sales_listview_rendered() {
    // Your logic here
}

Best Practices

  • Keep logic efficient and minimal to avoid UI lag
  • Avoid modifying actual data β€” only focus on UI-related enhancements
  • Use conditional checks for safer DOM manipulation
  • Maintain consistency with Merciglobal Cloud ERP’s theme and layout

Use Cases

Use Case Description
Color Row by Status Use CSS to highlight rows based on status (e.g., inactive)
Add Inline Buttons Insert DOM buttons for instant record actions
Show Icons for Field Values Display icons to represent states (e.g., error, success)
Bind Tooltips Attach informative tooltips for complex column headers

Pro Tip πŸ’‘

Always test across different screen sizes and themes to ensure a consistent user experience.


Need Help?

For more details or advanced integration, reach out to the Merciglobal Cloud ERP development support team.


Merciglobal Cloud ERP – Streamline, Customize, and Scale πŸš€