Where can it be useful to use JS Bookmarks?
- Look Up a records ID: A Bookmarklet, that shows you the current records ID can be a powerful debugging tool and elevates the quality of sharing of information with collegues
- Quick Field Value Lookup: You can create a bookmarklet that, when clicked, prompts the user to enter a field name and then displays the current value of that field on the CRM record page. This can be handy for quickly checking specific field values without navigating through the CRM interface.
- Data Validation: You can create a bookmarklet that performs data validation on a CRM record page. For example, it can check if certain fields are populated correctly or if any required fields are missing. This can help ensure data integrity and adherence to business rules.
- One-Click Actions: You can create bookmarklets that perform specific actions with a single click. For instance, you could create a bookmarklet that initiates a phone call or sends an email to a predefined recipient using data from the current CRM record.
- Data Manipulation: Bookmarklets can be used to manipulate data on CRM record pages. For example, you could create a bookmarklet that automatically fills in certain fields based on predefined rules or copies data from one field to another.
- Custom UI Enhancements: Bookmarklets can be used to enhance the user interface of CRM record pages. For instance, you could create a bookmarklet that adds a button or a dropdown menu to perform custom actions or display additional information.
- Integration with External Systems: Bookmarklets can facilitate integration with external systems. You could create a bookmarklet that retrieves data from an external API or performs actions in another system based on the CRM record data
- Streamlined Workflows: Bookmarklets can be integrated into existing workflows, allowing for one-click actions such as initiating phone calls, sending emails, or performing data validation.
- Troubleshooting Made Easy: Accessing record IDs and field values swiftly assists in troubleshooting and enhances communication with support teams or developers when encountering issues.
- Customizability: The bookmarklet code can be modified and enhanced to fit specific requirements, opening up possibilities for additional functionalities or UI improvements.
Example 1: Quick access of the record ID
Your advantages of using the script
Using a script like the one provided offers several advantages:
- Quick access to record ID: The script allows you to quickly retrieve the current record ID without manually navigating through the CRM interface or inspecting the page source code. This can save time, especially when you’re working with multiple records or need to reference the record ID frequently.
- Ease of use: Once the bookmarklet is set up, accessing the record ID is as simple as clicking on the bookmark in your browser’s bookmark bar. It eliminates the need to write custom code or open developer tools.
- Efficiency in troubleshooting: When encountering issues or bugs related to specific CRM records, having immediate access to the record ID can be invaluable for troubleshooting purposes. You can easily communicate the record ID to support teams or developers to help them identify and resolve the problem more effectively.
- Integration with workflows: The script can be used as a starting point for building more complex workflows or automation. For example, you can extend the script to perform additional actions based on the record ID, such as fetching related data or executing specific CRM operations.
Overall, the script provides a convenient and efficient way to access the record ID in Dynamics 365 CRM, saving time and enhancing productivity when working with CRM records.
Example 2: Quick Field Value Lookup
Once the bookmarklet is set up, click on it, and you’ll be prompted to enter the field name. After entering the field name and clicking “OK,” a pop-up alert will display the corresponding field value on the CRM record page.
Note: Keep in mind that this script assumes that the field names are in lowercase and are represented as data attributes (
data-field) on the CRM record page. If your CRM implementation uses a different structure for field names, you may need to modify the script accordingly.
With this bookmarklet, you can easily lookup specific field values on Dynamics 365 CRM record pages without manually searching for the field or inspecting the page source code.
How to use the Code
To use this code, follow these steps:
- Create a new bookmark in your browser.
- Edit the bookmark and give it a name (e.g., “Dynamics 365 Record ID”).
- Copy the entire code snippet provided above.
- Paste the code snippet into the URL/Address field of the bookmark.
- Save the bookmark.
Now, whenever you’re on a Dynamics 365 CRM record page, you can simply click on the bookmark, and it will display a pop-up alert with the current record ID.