Skip to content

How to

Use Sf Inspector with a connected app


For Chrome and Edge users

If you enabled "API client whitelisting" (a.k.a "API Access Control") in your org, SF Inspector may not work anymore.

To secure the extension usage, you can use a OAuth 2.0 flow to get an access token, linked to a connected app installed in your org.

  1. Open the extension and scroll down to the “Generate Access Token” button.
  2. You should see the “OAUTH_APP_BLOCKED” error which is normal at this stage.
  3. Go to “Connected Apps OAuth Usage” in setup and search for “Salesforce Inspector reloaded”.
  4. Click “Install” and then confirm installation.
  5. Now configure the profiles or permissions sets which will have the right to use the extension.
  6. Go back to “Connected Apps OAuth Usage” and click “Unblock” next to “Salesforce Inspector reloaded”
  7. Once again, open the extension and scroll down to the “Generate Access Token” button

2024-05-28_16-12-29 (1)

This is it ! You can use the extension with the default connected app.

From now when the token will be expired, this banner will show up and provide a link to re-generate the access token

image

Warning Don't forget to grant access to the users by selecting the related profile(s) or permission set(s).

If you are a Firefox user, or if you want to have full control over the connected app settings, you can also use your own connected app by following these instructions:

For Firefox users

  1. Create a connected app under Setup | App Manager > New Connected App.
  2. Set callback url to chrome-extension://chromeExtensionId/data-export.html (replace chromeExtensionId by the actual ID of the extension in your web browser). Make sure the "Manage user data via APIs (api)" scope is selected. You can leave other settings to their default values.

Warning Don't forget to replace "chromeExtensionId" with your current extension Id Connected App

  1. Get Consumer Key and save it in the Options page

Option button

  1. Enter the consumer key

Client Id

  1. Refresh page and generate new token

Generate Token

Migrate saved queries from legacy extension to Salesforce Inspector Reloaded

  1. Open data export page on legacy extension Inspect legacy
  2. Get saved queries from insextSavedQueryHistory property Inspect legacy
  3. Open it in VS Code, you should have a JSON like this one:
[
  { "query": "select Id from Contact limit 10", "useToolingApi": false },
  { "query": "select Id from Account limit 10", "useToolingApi": false }
]

From there you have two options

Import the queries by adding a label for each one with the label in query property suffixed by ":" ie.

[
  {
    "query": "Contacts:select Id from Contact limit 10",
    "useToolingApi": false
  },
  {
    "query": "Accounts:select Id from Account limit 10",
    "useToolingApi": false
  }
]

Re-import this json in the new extension (with the same key insextSavedQueryHistory)

Define a CSV separator

Add a new property csvSeparator containing the needed separator for CSV files

Update csv separator

If you want to always open extension's links in a new tab, you can enable> Warning

Open link in a new tab

Warning Enabling this option will prevent you to use Lightning navigation which allows faster navigation.

  • Data Export : e
  • Data Import : i
  • Org Limits : l
  • Download Metadata : d
  • Explore API : x
  • Event Monitor : m
  • Field Creator : f

Disable metadata search from Shortcut tab

By default when you enter keyword in the Shortcut tab, the search is performed on the Setup link shortcuts AND metadata (Flows, PermissionSets and Profiles). If you want to disable the search on the metadata, update related option:

image

Enable / Disable Flow scrollability

Go on a Salesforce flow and check / uncheck the checbox to update navigation scrollability on the Flow Builder

2023-09-29_16-01-14 (1)

Use custom shortcuts

You can add custom links to the "Shortcut" tab. These links will be stored in the sfHost + "_orgLinks" localStorage variable. The links are stored as a JSON array with the following properties: - label: The label of the link - link: The link to the page - section: The section where the link will be displayed - isExternal: A boolean indicating if the link is external (starts with 'http' or 'www')

The links are displayed in a table format with the following features: - Sortable columns (click on column headers to sort) - Search functionality to filter links by label, link, or section - Edit and delete buttons for each link - Add button to create new links

To add a new link: 1. Click the "+" button at the bottom of the table 2. Fill in the label, link, and section fields 3. Click the check icon to save or the X icon to cancel

To edit a link: 1. Click the edit icon (pencil) next to the link 2. Modify the fields 3. Click the check icon to save or the X icon to cancel

To delete a link: 1. Click the delete icon (trash) next to the link

To search links: 1. Use the search box at the top of the table 2. Type any text to filter links by label, link, or section 3. The table updates in real-time as you type

To sort links: 1. Click on any column header to sort by that column 2. Click again to reverse the sort order 3. The current sort column is indicated by an up/down arrow icon

The links are stored in the browser's localStorage, so they will persist between sessions. The links are specific to each org, so you can have different links for different orgs.

Custom Link Search

Enable summary view of PermissionSet / PermissionSetGroups from shortcut tab

Since Winter 24, there is a beta functionality to view a summary of the PermissionSet / PermissionSetGroups

image

You can enable this view for the Shortcut search by enabling the option as shown below.

Enable Summary

Then when you click on a PermissionSet / PermissionSetGroups search result, you'll be redirected to the summary.

Customize Create / Update rest callout headers (to prevent execution of auto assignment rules for Accounts, Cases, or Leads)

Assignment Rule Header

From the popup, click on "Options" button and select the API tab.

image

If you want to prevent auto assignment rules, set the createUpdateRestCalloutHeaders property to {"Sforce-Auto-Assign" : false}

Update API Version

Since the plugin's api version is only updated when all productions have been updated to the new release, you may want to use the latest version during preview windows.

[!IMPORTANT] When you manually update the API version, it won't be overridden by extension future updates.

2023-11-10_09-50-55 (1)

Delete All Apex Logs

Sometimes you need to purge the ApexLogs from you org, mostly when the maximum size limit is reached. You can now delete all apex logs with a simple click. From the popup, select 'Org' tab and click 'Delete All ApexLogs' button.

Delete All Apex Logs

Enable debug logs

Sometimes you may want to enable logs for a particular user. From User tab, click the "Enable Log" button.

By default, this will enable logs with level "SFDC_DevConsole" for 15 minutes.

Enable Log button

You can update the debug level (configuration is per organization) and duration (for all organizations) on the Options page.

DebugLog Options

Warning Increasing the default duration may lead to a high volume of logs generated.

Enable Debug Mode (for Lightning Components)

Enable debug mode to make it easier to debug JavaScript code from Lightning components. Warning: Salesforce is slower for users who have debug mode enabled.

Enable Debug Mode

Customize extension's favicon

From the option page, you can customize the default favicon by:

  • a predefined color name among those values or any HTML color code you want (ie #FF8C00).
  • a custom favicon url (ie "https://stackoverflow.com/favicon.ico")

The customization is linked to the org, it means you can have different colors for DEV and UAT env for example.

image

Now if you want to populate all the orgs you visited with a custom favicon, you have two options: - Smart mode enabled: this will analyze your environment name and populate a favicon based on this (blue for dev, green for int, purple for uat and orange for full) - Random: this will choose a random color among all the predefined colors

Then you click on Populate All and that's it! Note: orgs with an existing customized favicon won't be affected.

Customize sandbox banner color

From the option page, enable "Use favicon color on sandbox banner" image

image

Customize extension's shortcuts

Navigate to chrome://extensions/shortcut and choose dedicated shortcuts for the pages you want.

Use Chrome Shortcuts

Default shortcuts

If you want to open popup keyboard shortcuts, you can use the 'ctrl' (windows) or 'command' (mac) key with the corresponding key. Example:

  • Data Export : e
  • Data Import : i
  • Org Limits : l
  • Download Metadata : d
  • Explore API : x

Configure Import options in Data Import

You can configure the SOAP headers when importing records to specify Assignment Rule, Duplicate Rule or OwnerChangeOptions. Because custom headers can be hard to configure, you could iterate through suggestions by pressing down key. If you want to include new suggestions, feel free to open a new feature request.

If true, the account team is kept with the account when the account owner is changed. If false, the account team is deleted:

{"OwnerChangeOptions": {"options": [{"type": "KeepAccountTeam", "execute": true}]}}

For a duplicate rule, when the Alert option is enabled, bypass alerts and save duplicate records by setting this property to true:

  '{"DuplicateRuleHeader": {"allowSave": true}}'

If true for a Case or Lead, uses the default (active) assignment rule for a Case or Lead. If specified, don't specify an assignmentRuleId. If true for an Account, all territory assignment rules are applied. If false for an Account, no territory assignment rules are applied.

  '{"AssignmentRuleHeader": {"useDefaultRule": true}}',

SOAP Custom Headers

Highlight PROD with a top border

Production environment are critical, to avoid confusion with other orgs, you can enable an option which will add a 2px border on the top of the Salesforce UI and also in the extension's pages.

Under User Experience tab, enable the option Highlight PROD with a top border (color from favicon).

highlight prod with a top border

Import / Export configuration (saved query etc.)

With 1.25 and above

To export and import your current configuration, go to the options page and click the corresponding icon in the header:

Import / Export Configuration

Hide some buttons in the popup

Since the extension offers more features, the number of button is increasing. Some of the users may don't need some of those, to make the popup lighter some of the buttons can be hidden:

Hide Buttons

Switch user language from the popup

From the User tab in the popup, click on the user language flag to display the available languages.

2024-12-04_16-07-35 (1)

Generate a package.xml from a deployment

From a DeployRequest record, click on the Generate package.xml button to download the package.xml for this deployment.

[!NOTE] If you retrieve the related metadata it may have been modified since the deployment, so you are not sure to retrieve what was deployed.

Generate package.xml from a deployment

Grey out skipped columns in data import

From the 'Options' tab, enable the 'Grey Out Skipped Columns in Data Import' option and perform the data import. The un-imported columns will be greyed out.

Grey out un-imported columns