Code Monkey home page Code Monkey logo

tprouvot / salesforce-inspector-reloaded Goto Github PK

View Code? Open in Web Editor NEW
163.0 4.0 54.0 7.41 MB

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.

Home Page: https://chrome.google.com/webstore/detail/salesforce-inspector-relo/hpijlohoihegkfehhibggnkbjhoemldh

License: MIT License

JavaScript 62.71% CSS 36.20% Shell 0.46% HTML 0.60% Apex 0.02%
chrome-extension salesforce salesforce-api salesforce-developers

salesforce-inspector-reloaded's Introduction

Salesforce inspector reloaded

GitHub release Chrome Web Store Installs Chrome Web Store Rating GitHub stars GitHub contributors PRs Welcome

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.

We all know and love Salesforce Inspector: As the great Søren Krabbe did not have the time to maintain it anymore, I decided to take over so trailblazer community can keep asking for new features !

Documentation

User guide for using the extension.

view - Documentation

New features compared to original SF Inspector

  • Allow users to update API Version feature 58
  • Add new "Shortcuts" tab to accelerate setup navigation feature 42
  • Add shortcuts links to (list of record types, current SObject RecordType and objet details, show all data from user tab) from popup feature 34
  • Control access to Salesforce Inspector reloaded with profiles / permissions (Implement OAuth2 flow to generate access token for connected App) how to
  • Update manifest version from v2 to v3 (extensions using manifest v2 will be removed from the store)
  • New UI for Export / Import

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.

Use Salesforce Inspector with a Connected App

Follow steps described in how-to documentation. Note: you must complete these steps to use the extension in orgs where "API Access Control" is enabled.

Installation

Browser Stores

Beta Version

Welcome to the beta testing phase! Your input is crucial for refining our extension. Here's why we need you:

Why Beta Testing?

  • Diverse Testing: Identify issues across various setups.
  • Real-World Scenarios: Discover unforeseen issues in different user contexts.

Report Bugs: If you discover a bug, please fill in an issue here. Detailed bug reports help us address issues quickly.

To become a beta tester, install the release candidate version. Thank you for shaping our extension's future! Your feedback makes it better.

Local Installation

  1. Download or clone the repo.
  2. Checkout the releaseCandidate branch.
  3. Open chrome://extensions/.
  4. Enable Developer mode.
  5. Click Load unpacked.
  6. Select the addon subdirectory of this repository.

Troubleshooting

  • If Salesforce Inspector is not available after installation, the most likely issue is that your browser is not up to date. See instructions for Google Chrome.
  • When you enable the My Domain feature in Salesforce, Salesforce Inspector may not work until you have restarted your browser (or until you have deleted the "sid" cookie for the old Salesforce domain by other means).

Contributions

Contributions are welcome!

Before starting developments, create a feature request and explain the goal of it and the uses cases that it addresses. To submit a PR, please create a branch from releaseCandidate which is the work in progress next version. This branch will be merge into master when the new version is published on web store.

Make sure to update CHANGES.md file by describing the improvement / bugfix you realized.

In order to make sure everyone who reads documentation is aware of your improvement, you can update the 'how-to' page to document / expose this new functionality.

Linting : to assure indentation, formatting and best practices coherence, please install ESLint extension.

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.
  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. Everything described in metadata in test/. Push to org with sf deploy metadata -d test/ -o [your-test-org-alias] or legacy sfdx force:source:deploy -p test/ -u [your-test-org-alias].
    2. Make sure your user language is set to English.
    3. Ensure Allow users to relate a contact to multiple accounts is enabled (Setup → Account Settings).
    4. Ensure the org has no namespace prefix (Setup → Package Manager).
    5. Assign Permission Set SfInspector to your user.
  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

Design Principles

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

  • Stay completely inactive until the user explicitly interacts with it. The tool has the potential to break Salesforce functionality when used, since we rely on monkey patching and internal APIs. We must ensure that you cannot break Salesforce just by having the tool installed or enabled. For example, we won't fix the setup search placeholder bug.
  • For manual ad-hoc tasks only. The tool is designed to help administrators and developers interact with Salesforce in the browser. It is after all a browser add-on. Enabling automation is a non-goal.
  • User experience is important. Features should be intuitive and discoverable, but efficiency is more important than discoverability. More advanced features should be hidden, and primary features should be central. Performance is key.
  • Automatically provide as much contextual information as possible, without overwhelming the user. Information that is presented automatically when needed is a lot more useful than information you need to explicitly request. For example, provide autocomplete for every input.
  • Provide easy access to the raw Salesforce API. Enhance the interaction in a way that does not break the core use case, if our enhancements fails. For example, ensure we can display the result of a data export even if we cannot parse the SOQL query.
  • It is fine to implement features that are already available in the core Salesforce UI, if we can make it easier, smarter or faster.
  • Ensure that it works for as many users as possible. (for system administrators, for standard users, with person accounts, with multi currency, with large data volumes, with professional edition, on a slow network etc.)
  • Be conservative about the number and complexity of Salesforce API requests we make, but don't sacrifice the other principles to do so.
  • Focus on system administrators, developers and integrators.

About

By Thomas Prouvot and forked from Søren Krabbe and Jesper Kristensen

License

MIT

salesforce-inspector-reloaded's People

Contributors

aimaj avatar annubis45 avatar antoineleleu-salesforce avatar asknet avatar baslu93 avatar dependabot[bot] avatar dufoli avatar dyncan avatar evazi avatar garywoo avatar jefersonchaves avatar jesperkristensen avatar kamilgadawski avatar md931 avatar mehdicherf avatar nshulman avatar nvuillam avatar ogomezba avatar pietromartino avatar skrissi avatar sorenkrabbe avatar toly11 avatar tprouvot avatar victorgz avatar yaacov9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

salesforce-inspector-reloaded's Issues

Differentiate prod orgs in import menu

Is your feature request related to a problem? Please describe.
Sometimes when we have several orgs opened, it can be helpful to differentiate production orgs in import menu.

Describe the solution you'd like
A different design on the import page

ie
prod insert

[popup] Display current layout information

Is your feature request related to a problem? Please describe.
It would be great to have the current layout information on a record page (name + Link )

Describe the solution you'd like
image

Idea by Camille Guillory

[data-export] Delete a single record

I believe it could be good to allow single record deletion :
image

It would make the extension closer to classic SGBDR tools such as MySQL Workbench.

I don't include bulk actions or the update of a single record here because I think those should be seperate features.

[pop-up] Update / Add shortcuts

Is your feature request related to a problem? Please describe.
From the pop up, it would be great to have

  • A link to the SObject Record Types page and the current record recordtype.
  • A Link to the SObject detail page
  • A Link to the Fields and RelationShip page

Describe the solution you'd like

image

[feat] Import - Remove spaces from field names

Is your feature request related to a problem? Please describe.
Sometimes a space can be present in excel column names. When importing the data, it can be hard to find what is the issue

Describe the solution you'd like
Automatically remove the spaces from the api names(first row)

image

Data Export - Navigate with tabulator

When adding fields to a query, it would be useful if the first tab would select the first suggested field. The "Run Export" Button is not needed in that navigation because of strg+enter shortcut. This would save many klicks :) Thank you and best regards

image

Solution:

image

[data-export] Add a feature to compare data between 2 records

Use Case:
When debugging, it's useful to compare 2 records (working vs non-working).
Today, I have to :

  • Export data from 2 records
  • Copy values in Excel
  • Write a formula to compare field values

Expected:
It would be nice to have from the "Show All Data" screen the ability to compare current record with another one.
Field with differences might be highlighted in red.

[popup] Add show all data buttons in user tab

Is your feature request related to a problem? Please describe.
Today if we want to see all data on a user we have to click on detail buttons and wait for the see all data button.

Describe the solution you'd like
Have a New button "See all data" next to thé detail one in the User tab

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Save button at the top of the screen

Is your feature request related to a problem? Please describe.
no

Describe the solution you'd like
image

Describe alternatives you've considered

Additional context

Make tab key select the first suggested object/field in the Export query UI

The original version of Salesforce Inspector selects the first suggested (autocompleted) field or object when you are writing a SOQL query. This is a very handy feature as it speeds up query entry. When typing a query in Reloaded, the tab key select the Run Query button instead. Can you modify the tab key behavior (UI element selection order) so it would work like in the original version?

[popup] Add a new tab for shortcuts

Is your feature request related to a problem? Please describe.
In the popup we have two tabs to search on (Objects and Users).
It would be great to add a new tab to access shortcuts

Check also for users to add new shorcut in the extension

Add inactive users to search results

Is your feature request related to a problem? Please describe.
We can't search for inactive users in the pop up

Describe the solution you'd like
I would like to add inactive users to the results and add the information if the user is active or not (label ou icon).
Active users should be displayed first

image

[export] Saved query with ":" are not completely copied in editor

Describe the bug
When saving a query which contains ":", the result is not correct when selected from the select component:

2023-04-12_09-41-27 (1)

Original query :

To Reproduce
Steps to reproduce the behavior:

  1. Enter following query:
    SELECT id, Party.name, Country__c from ContactPointTypeConsent where CreatedDate = LAST_N_DAYS:90
  2. Save it with a name
  3. Then select it from the saved queries
  4. See that result is
    SELECT id, Party.name, Country__c from ContactPointTypeConsent where CreatedDate = LAST_N_DAYS
    instead of
    SELECT id, Party.name, Country__c from ContactPointTypeConsent where CreatedDate = LAST_N_DAYS:90

[data-export] Double "Show all data" button

Describe the bug
When running a query on ContentDocument, we have two buttons "Show all data", one for ContentDocument and the other for ContentNote (the extra one to remove)

image

SELECT Id, title FROM ContentDocument WHERE LatestPublishedVersionId ='068XXXXXXXX'

[popup] New UI

Bonjour Thomas,

Je pense que l'interface de la popup est en décalage complet avec celle de l'outil d'import/export.
Il serait tellement plus agréable d'utiliser l'outil si tout était harmonisé.

image

Cordialement 🤙 ,

Importing (Use Tooling API?) action is auto set to Update

Describe the bug
In my case I'm trying to delete flows. When I've set all the parameters (Use tooling API?, object, action, batch size etc). and I've entered the excel copy the action changes automatically from "delete" to "update".

And the same happens when you copy the options and add that text to the excel copy.

To Reproduce
See above

Expected behavior
I've expected that the action stays on delete.

Screenshots
If applicable, add screenshots to help explain your problem.

https://share.cleanshot.com/bP3QNlDJ

Desktop (please complete the following information):

  • OS: [e.g. iOS] MacOs
  • Browser [e.g. chrome, safari] Brave browser
  • Version [e.g. 22] Version 146.140 Chromium: 108.0.5359.99 (Official Build) (x86_64)

Additional context
Add any other context about the problem here.

Add title to the saved queries

Once we save a query , this one is added to the "saved queries" part. But when we have many saved queries, it' sometimes complicated to select the correct one. Indded, the name of the saved query begins with the name of the field.
It would be very useful to be able to add a title to each query we saved.

[general] Allow user to update api version

Is your feature request related to a problem? Please describe.

Since the api version is only updated when all productions have been updated to the latest version, some users may want to use the latest version before.

Describe the solution you'd like

When double clicking on the api version in the popup (or display a pen icon to show user an action is available), transform api version into an input where user can override default api version.
The save will be triggered on enter key or loose focus.
The new api version will be stored in the localStorage.

image

[data-export] Add snippet(s) to query editor

Is your feature request related to a problem? Please describe.
It would be nice to have some snippets on the data-export query editor

Describe the solution you'd like
For example I would like to enter "sf" and then have an autocomplete suggestion which enters "SELECT Id FROM"

[popup] Switch language from popup

Is your feature request related to a problem? Please describe.
It should be great to switch language on user directly from the pop-up.
A clic on the flag trigger a rest callout to update the user language

image

Remove Saved Query typo

Describe the bug
In the Data Export feature, there's a typo on the saved query removal button.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Data Export'
  2. Click on the arrow next to "Save Query"
  3. See the typo

Expected behavior
The label should say "Remove Saved Query" instead of "Removed Saved Query"

Screenshots
image

Desktop:

  • Browser chrome
  • Version 1.16

Additional context
I could fix it and create the PR.

An option to always open a new tab

When opening the Inspector panel and clicking Data Export (for example), I never want to open it on top of the existing browser tab. Yes, I can click the middle mouse button to open a new tab instead but it would be great to have an option to always open the Inspector pages in a new browser tab.

Add button to format query

On export query page, add a button to format the input query, it would include:

  • removing breaklines
  • removing double spaces
  • removing space before a comma, and add a space after a comma
  • format SOQL keywords (select=> SELECT, from=>FROM etc.)

[ci/cd] Run tests on PR

Is your feature request related to a problem? Please describe.
It would be nice to automatically run test-framework.js when creating a PR and prevent to merge if fail.

Add shortcut to select proposed fields, sobjects in query export page

Is your feature request related to a problem? Please describe.
It would be great if we could use keyboard shortcut to select one of the fields or SObject proposed in SOQL export query

Describe the solution you'd like
For example, we could use the combination Alt+1 to select "TimeSheet__c ", Alt + 2 for "TimeSheet__ChangeEvent" and so on..
image

Describe alternatives you've considered
Click on the selected item

JSON format record import

Is your feature request related to a problem? Please describe.
As an admin would love to be able to import data based on JSON format.

Describe the solution you'd like
Since i can export records as JSON, i can then use JS scripting to alter records any way i want.
I then would love to be able to re-import them.

Describe alternatives you've considered
For now, i need to script a CSV export for said record. it causes unnecessary work, and issues with escaping chars (line breaks, commas, and so on).

Additional context
It would also circumvent an issue i opened on legacy repo
sorenkrabbe/Chrome-Salesforce-inspector#248

[feat] Import : format relations as expected on paste

When exporting data from inspector, the format is "MaskSObject__r.APIName__c"
image

But the expected format is : "MaskSObject__r:MaskSObject__c:APIName__c"

Either update the expected format or format the input as expected on the paste

[popup] object links for CMDT

Describe the bug
The object links ("Name", "Fields Setup" & "Object List") for Custom Metadata objects does not work properly,

To Reproduce
Steps to reproduce the behavior:

  1. Search for a custom metadata object in popup search input
  2. Click on the links
  3. See error

Expected behavior
The links should redirect to CMDT objects details

Screenshots
image

Additional context
Add any other context about the problem here.

[popup] Add current release info

Is your feature request related to a problem? Please describe.
It would be great to know the current version of the release

Describe the solution you'd like
We could add a title to the api version to describe the current release.

NB the api version can be lower than the current release, ie we're on a sandbox in preview.

image

[general] Notify users on extension update

Is your feature request related to a problem? Please describe.
When the version has been updated, display a message showing new release

// Check whether new version is installed
chrome.runtime.onInstalled.addListener(function(details){
    if(details.reason == "install"){
        console.log("This is a first install!");
    }else if(details.reason == "update"){
        var thisVersion = chrome.runtime.getManifest().version;
        console.log("Updated from " + details.previousVersion + " to " + thisVersion + "!");
    }
});

Fixer l'entête de l'export

Pour plus de lisibilité sur l'instant, avant même la copie dans un fichier excel. C'est toujours plus pratique d'avoir l'entête visible durant le scroll.

image

Solution dégradée : insérer des lignes d'entête toutes les X lignes qui ne seront évidemment pas à prendre en compte dans l'export.

Extra comma

When we want to modify the selection field using .r instead of c in order to add a lookup field, an extra comma is adding to the existing one, and we are obliged to remove this new comma.
image

Export - 1 Tab for fields

I like it, but I prefer the original one because when I do an export I am used to select the field from the below list using the tab key. In the original extension is 1 tab, with this one I have to do 4 tabs (Run export -> Account Field Info -> Bulb Icon -> Fields List)

Hope you can fix this, or at least, be able to configure it in "Settings" or something similar.

Scrolling issue in flow screen

When moving the flow with "left click + drag" from the top of the flow and then scrolling with the mouse wheel, we cannot go back to the top.
The scrollbar is getting "bigger" when "left click + drag" from the top. It shouldn't be the case.

Sans titre

[feat] Display deployment components detail

Is your feature request related to a problem? Please describe.
It would be great to be able to display deployment details from "Deployment status" page or deployment record detail

Describe the solution you'd like
image

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.