As a technical support engineer for SugarCRM, I often need to see specific field values for a record. But fields can sometimes be hidden from the Record View or even missing from the layout entirely. Additionally, knowing just the field name (rather than the display label) often requires extra steps. Normally, you’d have to go into Studio to locate the field in the layout or find its display label, then return to the Record View to track it down. This back-and-forth can be time-consuming, especially with complex layouts or multiple fields.
To make this easier, I created a JavaScript script that runs directly in the browser console while viewing a record. With one click, this script pulls all fields for the current record and displays each field’s name, display label, and value in an organized table, so you have everything you need right at your fingertips.
The Script
Here’s the JavaScript code that retrieves and displays the field information:
Using the Bookmarklet
To make accessing this script easier, I turned it into a bookmarklet. A bookmarklet allows you to run JavaScript with a single click by saving it as a bookmark in your browser. Once set up, you can retrieve all field information with a quick click, avoiding the need to re-paste code.
Here’s how you can create and use this bookmarklet:
- Copy the code below:
- In your browser, go to your bookmarks and select “Add New Bookmark” (the wording may vary depending on the browser).
- In the URL field, paste the code you copied. Then, name your bookmark something recognizable, like Show SugarCRM Fields.
- Save the bookmark.
How to Use the Bookmarklet
- Open the record in SugarCRM where you want to view all field information.
- Open your browser console (usually accessed via F12 or right-clicking to "Inspect Element," then navigating to the Console tab).
- Click the Show SugarCRM Fields bookmark you created, and the script will automatically display a table in the console with each field’s display label, field name, and current value for that record.
This script provides a complete snapshot of all fields, regardless of whether they are in the visible layout, allowing you to troubleshoot quickly and accurately.
Feel free to try it out, and I hope it helps simplify your work with SugarCRM as much as it has for me. Happy troubleshooting!