Salesforce Record Age Highlighter
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
This userscript brings visual record aging intelligence to Salesforce by displaying color-coded age badges and row highlighting on list views, reports, and record detail pages. It reads record creation dates and last modified dates directly from the Salesforce UI, calculates the age in days, and applies configurable color-coded highlighting based on customizable thresholds. Each record displays a compact badge showing the exact number of days since creation (or last modification), and the entire row can be highlighted with a subtle background color. Color thresholds are fully customizable: new records (0-7 days) appear green, young records (8-30 days) yellow, mid-aged records (31-90 days) orange, old records (91-180 days) red, and stale records (181+ days) dark red. The script also reads record status and owner information to include in tooltips, and optionally excludes closed or won records from highlighting.
WHERE IT RUNS
The script activates on all Salesforce pages including list views (salesforce.com/list/*), report views, Lightning pages, and record detail pages. It works across both Classic and Lightning Experience interfaces, automatically detecting record tables and date fields.
HOW TO USE
After installation, navigate to any Salesforce list view or report. The script automatically scans visible records, extracts date information, and applies color-coded badges and row highlighting. Use the panel to customize age thresholds and colors - adjust the min/max days for each age category and pick your preferred colors. Switch between badge-only, background-only, or combined display modes. Choose between using creation date or last modified date for age calculation. Toggle whether to exclude closed or won records, and enable or disable tooltips. Click "Refresh Highlights" to reapply after making changes or "Reset Rules" to restore default settings.
THE ACTUAL REASON IT WORKS
Unlike Salesforce's built-in reporting which requires creating custom formula fields and reports, this script performs real-time DOM scraping optimized for Salesforce's complex UI framework. It uses a multi-strategy extraction approach: first targeting Salesforce-specific data attributes (data-recordid, data-id, data-status), then leveraging Salesforce's table structure patterns (listViewBlock, dataTable, slds-table). For date parsing, the script handles multiple Salesforce date formats including MM/DD/YYYY, YYYY-MM-DD, and MMM DD, YYYY. It identifies date fields by looking for column labels containing "Created", "Modified", or "Date" and extracts the corresponding cell values. The highlighting is applied by adding CSS classes to table rows without disrupting Salesforce's JavaScript event handlers or the Lightning component lifecycle. The script also respects Salesforce's closed/won status logic, allowing users to filter out records that should not be highlighted.
THE PANEL
The panel is fully draggable by its header and remembers its position across page loads using GM_setValue. It collapses to a small icon when minimized, preserving screen space. Press Escape or click the × button to close the panel. The panel includes an age rules editor where you can add, remove, or modify age thresholds with number inputs and color pickers. A live preview circle shows each rule's color. The panel also provides toggle switches for display mode, date source, excluding closed records, and tooltips, plus action buttons for refreshing and copying data.
PLEASE NOTE
This userscript requires the free BotGentz extension to run. The script reads only record data visible on the current page - it does not load additional records beyond what is rendered in the viewport. For large list views, ensure all records are loaded by scrolling before relying on the highlighting. Salesforce periodically updates its interface, which may affect record detection; we actively maintain the script for compatibility. The script does not send any data to external servers - all processing occurs locally in your browser. Age calculations are based on the date fields as displayed in Salesforce; records with missing or malformed date fields will not display a badge. In Lightning Experience, record data may be lazy-loaded; you may need to scroll through the list to trigger full highlighting.