sorenkrabbe / Chrome-Salesforce-inspector

Chrome extension to add a metadata layout on top of the standard Salesforce UI to improve the productivity and joy of Salesforce configuration, development, and integration.
336 stars 128 forks source link

Salesforce inspector

Chrome and Firefox extension to add a metadata layout on top of the standard Salesforce UI to improve the productivity and joy of Salesforce configuration, development, and integration work.

Test Status

Installation

:sunny: Add to Chrome :sunny: Add to Firefox

Features

Inspector menu Show field metadata Show all data for record Data exporter Data importer Monitor limits

Security and Privacy

The Salesforce Inspector browser extension/plugin communicates directly between the user's web browser and the Salesforce servers. No data is sent to other parties and no data is persisted outside of Salesforce servers after the user leaves the Salesforce Inspector pages. The Inspector communicates via the official Salesforce webservice APIs on behalf of the currently logged in user. This means the Inspector will be capable of accessing nothing but the data and features the user has been granted access to in Salesforce.

All Salesforce API calls from the Inspector re-uses the access token/session used by the browser to access Salesforce. To acquire this access token the Salesforce Inspector requires permission to read browser cookie information for Salesforce domains.

To validate the accuracy of this description, inspect the source code, monitor the network traffic in your browser or take my word.

Troubleshooting

Development

  1. Install Node.js with npm
  2. npm install

Chrome

  1. npm run chrome-dev-build
  2. Open chrome://extensions/.
  3. Enable Developer mode.
  4. Click Load unpacked extension....
  5. Select the addon subdirectory of this repository.

Firefox

  1. npm run firefox-dev-build
  2. In Firefox, open about:debugging.
  3. Click Load Temporary Add-on….
  4. Select the file addon/manifest.json.

Unit tests

  1. Set up an org (e.g. a Developer Edition) and apply the following customizations: 1.a. Everything described in metadata in test/org/. Push to org with sfdx force:mdapi:deploy --deploydir test/org -w 1000 -u [your-test-org-alias] 1.b. Ensure Allow users to relate a contact to multiple accounts is enabled (Setup→Account Settings) 1.c. Ensure the org has no namespace prefix (Setup→Package Manager)
  2. Navigate to one of the extension pages and replace the file name with test-framework.html, for example chrome-extension://example/test-framework.html?host=example.my.salesforce.com.
  3. Wait until "Salesforce Inspector unit test finished successfully" is shown.
  4. If the test fails, open your browser's developer tools console to see error messages.

Linting

  1. npm run eslint

Release

Version number must be manually incremented in addon/manifest-template.json file

Chrome

If the version number is greater than the version currently in Chrome Web Store, the revision will be packaged and uploaded to the store ready for manual release to the masses.

Firefox

  1. npm run firefox-release-build
  2. Upload the file from target/firefox/firefox-release-build.zip to addons.mozilla.org

Design Principles

(we don't live up to all of them. pull requests welcome)

About

By Søren Krabbe and Jesper Kristensen

License

MIT