In this post, we’ll explore a powerful productivity tool for Salesforce developers called Salesforce Advanced Code Searcher. This tool offers a range of features that can streamline your development process, including code searching, code coverage analysis, record details retrieval, and it also includes a LWC editor. In this blog post, I’ll provide a step-by-step guide on how to add and utilize this extension in Google Chrome.
How to add Salesforce Advanced Code Searcher extension to your browser ?
- Open the Chrome browser and perform a Google search for “Salesforce Advanced Code Searcher.”
- Click on the first search result, which should be the plugin you’re looking for.
- Add the extension to Chrome by clicking on “Add to Chrome.”
- Pin the Salesforce Code Researcher icon for easy access.
Once the extension is added to your browser, login to Salesforce and you will see the Salesforce Advanced Code Searcher inside of Salesforce. It comes with a variety of features, so let’s go through them One-by-One.
After you have logged in to Salesforce org, please follow the steps below :
- Click the “Click here to authorize button” as shown in the image above.
- Choose your Org i.e. Developer, Sandbox or Production. Since I am using Developer Sandbox, I will choose the Developer option.
- Click the Authorize Button and login to Salesforce using the username and password.
- Click Allow Access button
- After you are successfully authorized, you will be routed to Salesforce org and you will be able to use “Salesforce Advanced Code Searcher ” extension.
Searching for Code References
As a Salesforce developer, finding references to variables, field names, or other elements within your Apex code is a common task. With Salesforce Advanced Code Searcher, you can perform this search without leaving the Salesforce environment.
- Open the Salesforce Advanced Code Searcher extension.
- Click on the “Search Code” feature.
- Enter the text you want to search for.
- Choose the type of code you want to search (class, page, trigger, VF component, or LWC).
- Click “Go” to initiate the search.
- The extension will display the classes or components that contain the specified search text.
Analyzing Code Coverage
Traditionally, checking code coverage in Apex required navigating to the Developer Console or querying backend tables. However, Salesforce Advanced Code Searcher simplifies this process by allowing you to view code coverage results directly within Salesforce.
- Go to the setup page of the Salesforce Advanced Code Searcher extension.
- Click on the “Code Coverage” button.
- Choose one of the three options: “Aggregate Code Coverage,” “Independent Code Coverage,” or “Org Level Code Coverage.”
- “Aggregate Code Coverage” displays coverage information for all classes, including test classes.
- “Independent Code Coverage” shows code coverage for classes other than test classes.
- “Org Level Code Coverage” provides a comprehensive overview of code coverage across the entire organization.
Static Code Analysis
- System will analyze Apex Classes, Trigger, LWC and Aura for code violation.
- Depending on the code base, it may take anywhere between 2 to 5 min for the results to be prepared. The download will be available only for 2 hours.
- In case you have IP restriction, then please review you login history and whitelist the IP address which is being blocked.
Retrieving Record Details
Salesforce Advanced Code Searcher offers a convenient feature to view field values for a specific record, even if it’s not included in the page layout. You can also access related child records and navigate to parent records.
- Access the setup page of the Salesforce Advanced Code Searcher extension.
- Choose the “Get Record Details” option.
- Enter the 15 or 18-digit ID of the record you want to retrieve.
- Click “Get Details” to view all the available fields for that record.
- If there are child records associated with the primary record, they will be displayed as well.
- To edit the record details, make the desired changes and click “Save.”
- The extension also allows you to refresh field details, delete records, and navigate to the record owner.
Editing Lightning Web Component (LWC) Code
Developers working with Lightning Web Components often rely on external tools like Visual Studio Code for editing. However, Salesforce Advanced Code Searcher includes a unique LWC editor feature that enables you to view and edit LWC code directly within Salesforce.
- Open the setup page of the Salesforce Advanced Code Searcher extension.
- Click on “LWC Editor” to access the editor window.
- Create a new LWC component by clicking “Create Component” and providing a meaningful name.
- Include CSS or SVG files if needed.
- Specify the target page(s) to include in the LWC’s meta file.
- Edit the HTML page using the provided editor.
- Save your changes, and they will be reflected directly in Salesforce.
- The editor offers different themes to customize your editing experience.
Salesforce Advanced Code Searcher is a powerful extension that can significantly enhance the productivity of Salesforce developers. By enabling code searching, code coverage analysis, record details retrieval, and even an in-platform LWC editor, this tool streamlines various aspects of the development process. Adding this extension to your Chrome browser opens up new possibilities for efficient and effective Salesforce development.