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

[data-export] Query of junction object returns multiple incorrect records #704

Closed
MosheZuchmir opened this issue Jan 13, 2025 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@MosheZuchmir
Copy link

Make sure to read the troubleshooting section before creating an issue

  • [ v] I've read the common issues and the one I'm about to create is not one of those documented.
  • [v ] I've read the release note and the one I'm about to create is not already fixed.

Describe the bug
Query of a junction object returns multiple incorrect records that mostly don't exist.
The following query for example returns 1606 records, but running the same SOQL in the developer's console only returns 265 records:

select ServiceAppointment.Latitude, ServiceAppointment.Longitude, ServiceAppointment.AppointmentNumber, ServiceResourceId, ServiceAppointment.SchedStartTime
from AssignedResource
where ServiceAppointment.OptContext__c like 'CO CRIS 2%'
and ServiceAppointment.SchedStartTime > 2025-08-11T00:00:00.209-06:00
and ServiceAppointment.SchedStartTime < 2025-08-12T00:00:00.209-06:00
order by ServiceAppointment.AppointmentNumber, ServiceAppointment.SchedStartTime

The results includes the following entries for ServiceAppointment record "SA-15705021" , some for linked record identified by ServiceResourceId 0Hn3j000000TYg2CAG which is a duplicate and two other references to other ServiceResource records:

_ ServiceAppointment ServiceAppointment.Latitude ServiceAppointment.Longitude ServiceAppointment.AppointmentNumber ServiceAppointment.SchedStartTime ServiceResourceId [AssignedResource] [ServiceAppointment] 39.541324 -104.819348 SA-15705021 2025-08-11T16:42:00.000+0000 0Hn3j000000TYbdCAG [AssignedResource] [ServiceAppointment] 39.541324 -104.819348 SA-15705021 2025-08-11T16:42:00.000+0000 0Hn3j000000TYjbCAG [AssignedResource] [ServiceAppointment] 39.541324 -104.819348 SA-15705021 2025-08-11T16:42:00.000+0000 0Hn3j000000TYg2CAG [AssignedResource] [ServiceAppointment] 39.541324 -104.819348 SA-15705021 2025-08-11T16:42:00.000+0000 0Hn3j000000TYg2CAG [AssignedResource] [ServiceAppointment] 39.541324 -104.819348 SA-15705021 2025-08-11T16:42:00.000+0000 0Hn3j000000TYg2CAG [AssignedResource] [ServiceAppointment] 39.541324 -104.819348 SA-15705021 2025-08-11T16:42:00.000+0000 0Hn3j000000TYjbCAG

To Reproduce
Steps to reproduce the behavior: Per the above, likely with any junction object.

Expected behavior
The above DOQL should have returned a single record for each ServiceAppointment and ServiceResource.

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

Desktop (please complete the following information):

  • OS: Win 11
  • Browser: chrome
  • Version: not sure

Additional context
Add any other context about the problem here.

@MosheZuchmir MosheZuchmir added the bug Something isn't working label Jan 13, 2025
@tprouvot
Copy link
Owner

Hi @MosheZuchmir,
Could you try the same request on dev console ?
If you have the same result then it's not a Reloaded issue

@MosheZuchmir
Copy link
Author

hi @tprouvot , per my comments in the description the dev console returns the correct 265 records, vs. 1606 returned in the inspector. This seems like a fairly severe issue IMHO.

@MosheZuchmir
Copy link
Author

@tprouvot, interestingly I just ran the same SOQL again and it now returns the correct number of records.
Has anyone made any fixes just now?

@tprouvot tprouvot changed the title Query of junction object returns multiple incorrect records [data-export] Query of junction object returns multiple incorrect records Jan 13, 2025
@tprouvot
Copy link
Owner

Hi @MosheZuchmir,
You did not mentioned the version you were using when you opened the issue, is it the 1.25 ?
Are you using the main or beta version ?

I updated the % release of the new version this morning so you may have been upgraded to the new version (chrome should have ask you for granting permission for a new domain)

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

2 participants