-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[data-export] Double "Show all data" button #63
Comments
Hi @tprouvot, I was not able to replicate it. |
Hi @baslu93 , |
Hi @baslu93, It looks like this bug only occurs on orgs that have Notes enabled: |
Hi @tprouvot, Thank you! You can assign the issue to me. |
Hi @baslu93, I like the idea to do a callout on ui-api to get the object name but I would prever to do it only when needed. There is also a new feature (Query record) which relies on the sobject name and must be available from data-export page. popLink(
() => {
let recordId = cell;
let {globalDescribe} = rt.describeInfo.describeGlobal(rt.isTooling);
let objectTypes = [];
if (globalDescribe) {
let keyPrefix = recordId.substring(0, 3);
objectTypes = globalDescribe.sobjects.filter(sobject => sobject.keyPrefix == keyPrefix).map(sobject => sobject.name);
//particular use case when multiple sobjects have the same keyPrefix
if (objectTypes.length > 1){
sfConn.rest(`/services/data/v${apiVersion}/ui-api/records/${recordId}?layoutTypes=Compact`).then(res => {
objectTypes = objectTypes.filter(objectType => objectType == res.apiName);
});
}
}
return {objectTypes, recordId};
},
cell
); |
## Describe your changes I created a new pull request, following @tprouvot suggestion. Now only when the object is one of the following: | Object Name | Key Prefix | | ------------- | ------------- | | entitlementcontact | 000 | | entitysubscription | 000 | | productentitlementtemplate | 000 | | casecomment | 00a | | ideacomment | 00a | | accountpartner | 00I | | opportunitypartner | 00I | | partner | 00I | | leadstatus | 01J | | opportunitystage | 01J | | contentdocument | 069 | | contentnote | 069 | a callout using `/ui-api/records/` is fired to get the exact Object ApiName. The api has `layoutTypes=Compact` so that not all the layout infos are pulled, but just the compact layout infos. In the objects listed above the changes that can be applied to the compact layout are limited, so that I expect the api speed cannot drammatically change. ### Test executed: - Click "Show all data" in the query results of "SELECT Id FROM Account" - Click "Query record" in the query results of "SELECT Id FROM Account" - Click "Show all data" in the query results of "SELECT Id FROM ContentDocument" - Click "Query record" in the query results of "SELECT Id FROM ContentDocument" - Click "Show all data" in the query results of "SELECT Id,WhatId FROM Task" (both Id and WhaId) - Click "Query record" in the query results of "SELECT Id,WhatId FROM Task" (both Id and WhaId) ## Issue ticket number and link [Issue 63](#63) ## 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 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 - [ ] I ran the [unit tests](https://github.com/tprouvot/Salesforce-Inspector-reloaded#unit-tests) and my PR does not break any tests - [ ] I added a new section on [how-to.md](https://github.com/tprouvot/Salesforce-Inspector-reloaded/blob/master/docs/how-to.md) (optional) --------- Co-authored-by: DIR\luca.bassani <[email protected]> Co-authored-by: Thomas Prouvot <[email protected]>
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)
SELECT Id, title FROM ContentDocument WHERE LatestPublishedVersionId ='068XXXXXXXX'
The text was updated successfully, but these errors were encountered: