Skip to content

Commit

Permalink
Add option to enable / disable sobject context on data export (#342)
Browse files Browse the repository at this point in the history
## Describe your changes

Add option to enable / disable SObject type when data export from an
SObject.

## Issue ticket number and link
#341 

## Checklist before requesting a review
- [x] I have read and understand the [Contributions
section](https://github.com/tprouvot/Salesforce-Inspector-reloaded#contributions)
- [x] Target branch is releaseCandidate and not master
- [x] I have performed a self-review of my code
- [x] I ran the [unit
tests](https://github.com/tprouvot/Salesforce-Inspector-reloaded#unit-tests)
and my PR does not break any tests
- [x] I documented the changes I've made on the
[CHANGES.md](https://github.com/tprouvot/Salesforce-Inspector-reloaded/blob/master/CHANGES.md)
and followed actual conventions
- [x] I added a new section on
[how-to.md](https://github.com/tprouvot/Salesforce-Inspector-reloaded/blob/master/docs/how-to.md)
(optional)
  • Loading branch information
tprouvot authored Mar 7, 2024
1 parent 1d8dca3 commit 0ffadad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Version 1.23

- Add an option to enable / disable SObject context on data export [issue 341](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/341)
- Remove Consumer key input from data export [issue 338](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/338)
- Customize extension's favicon [feature 197](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/197)
- Save default batch size and thread for data import [feature 329](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/329) (feature request by [ritterblau](https://github.com/ritterblau))
Expand Down
3 changes: 2 additions & 1 deletion addon/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ class OptionsTabSelector extends React.Component {
title: "Data Export",
content: [
{option: CSVSeparatorOption, props: {key: 1}},
{option: Option, props: {type: "toggle", title: "Display Query Execution Time", key: "displayQueryPerformance", default: true}}
{option: Option, props: {type: "toggle", title: "Display Query Execution Time", key: "displayQueryPerformance", default: true}},
{option: Option, props: {type: "toggle", title: "Use SObject context on Data Export ", key: "useSObjectContextOnDataImportLink", default: true}}
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion addon/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class App extends React.PureComponent {
exportArg.set("host", sfHost);
importArg.set("host", sfHost);
limitsArg.set("host", sfHost);
if (e.contextSobject) {
if (e.contextSobject && localStorage.getItem("useSObjectContextOnDataImportLink") !== "false") {
let query = "SELECT Id FROM " + e.contextSobject;
if (e.contextRecordId && (e.contextRecordId.length == 15 || e.contextRecordId.length == 18)) {
query += " WHERE Id = '" + e.contextRecordId + "'";
Expand Down

0 comments on commit 0ffadad

Please sign in to comment.