Skip to content
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

Custom Object Name Links Don't Work #218

Closed
SRosewood opened this issue Nov 10, 2023 · 10 comments
Closed

Custom Object Name Links Don't Work #218

SRosewood opened this issue Nov 10, 2023 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@SRosewood
Copy link

Make sure to read the troubleshooting section before creating an issue

Describe the bug
When clicking an object name via SF inspector, this should take the user to the object manager page for that object in setup. Instead the url object name is undefined and navigates the user to the object manager home page in setup.

This works for standard objects but not custom objects.

To Reproduce
1 - Open an org
2 - Open SF Inspector
3 - Search for a custom object
4 - Click Object Name (URL Link)

Expected behavior
Should take user to custom object manager page for that object.

Screenshots
1 - Click Custom Object
2 - Undefined URL
3 - Object Manager Home

Desktop (please complete the following information):

  • OS: MacOS Ventura 13.5.2
  • Browser: Chrome
  • Version: 119.0.6045.123
@SRosewood SRosewood added the bug Something isn't working label Nov 10, 2023
@tprouvot
Copy link
Owner

Hi @SimonKaya ,
Could you run the query
SELECT COUNT() FROM EntityDefinition and tell me how many records are returned.

I don't know how are you dev skills but you may check if everything is going fine during the retrieve of the EntityDefinition objects.

2023-11-10_14-24-24 (1)

If you could share me the results via a video or gif it could be great, if not we can see if we can schedule a short meeting

@SRosewood
Copy link
Author

SRosewood commented Nov 13, 2023

Thanks for the fast response @tprouvot

I don't use the chrome inspector or debugging tool for my line of work but think I've caught what you were looking for. I seemed to have to refresh the tab to catch the debug however now sure if that makes a difference or not based on your video.

Looks like my count is 2620.

SF.Inspector.Debug.mov

If you need more information or a better example it might be easier to plan a call.

@tprouvot
Copy link
Owner

@SimonKaya
Great thanks for this 👏
If the total number of EntityDefinition is 2620 it means you should iterate only two times in this loop.
Could you check if the object you are looking for is contained in this list ?

To be able to do that you'll have to put a conditional breakpoint by testing the record.QualifiedApiName with your custom object

image

@SRosewood
Copy link
Author

@tprouvot

The expected record looks to be there from what I can see:
Configuration Item Debug

@jefersonchaves
Copy link
Contributor

jefersonchaves commented Nov 16, 2023

The potential cause is due to the following code where it expects durableId that is undefined:
image

In my troubleshooting it seems to be caused by durableId not being retrieved at first describe, later the durableId it is retrieved at via this line but the addEntity code does not check if the entity previously had no durableId.

So, a potentially fix is to add this check.

jefersonchaves added a commit to jefersonchaves/Salesforce-Inspector-reloaded that referenced this issue Nov 16, 2023
@jefersonchaves
Copy link
Contributor

@tprouvot - I have created #228 based on what I understood, hopefully it helps.

@tprouvot
Copy link
Owner

Hi @SRosewood ,
Could you check if the fix of @jefersonchaves could resolve your issue ?
To do so, you can create a conditional breakpoint (based on the name of your custom object) on addEntity method from popup.js file and enter this code in the dev console entity.durableId = durableId;

After that check if the link in the popup is functional

image

@jefersonchaves
Copy link
Contributor

Yes, I did the test manually on my browser before the PR. That is the same code and it fixed the issue.

jefersonchaves added a commit to jefersonchaves/Salesforce-Inspector-reloaded that referenced this issue Nov 16, 2023
tprouvot pushed a commit that referenced this issue Nov 20, 2023
## Describe your changes
Add a check if `durableId` was not previously set but the entry is
already added into the map.

## Issue ticket number and link
#218 

## 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
- [ N/A ] I added a new section on
[how-to.md](https://github.com/tprouvot/Salesforce-Inspector-reloaded/blob/master/docs/how-to.md)
(optional)
@tprouvot
Copy link
Owner

tprouvot commented Nov 20, 2023

@SRosewood I'm closing the issue since Jeferson provided a fix, please feel free to reopen it if you're issue is still running

@SRosewood
Copy link
Author

Sorry for the delayed response @tprouvot .

Yes has worked thanks @jefersonchaves look forward to the fix making a release soon. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants