Announcement

Collapse
No announcement yet.

API returns duplicate records

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • API returns duplicate records

    Hi this is a long standing issue for us, not sure if anyone else is seeing it?

    Basically if a phone number or an email address is shared between more than one enitty (e.g. the same email address used for a contact and a company), then the API returns two identical objects on queries. The UI then de-dupes them.

    The autocompelte field completeion code doesn't de dupe and you end up seeing duplicate names in the result dropdown.

    The 'Total: #' labels also include the duplicate records which means the counts are sometimes off.

    This causes the 'Show More' functionality to constantly half the requested number of records. E.g. it requests 8, then 4 then 2.

    Finally the Show More appears when there are no records to retrieve!

    I know that it's possible to code up some check for duplicate email addresses, phone numbers etc, but it would be great if the API itself would only return unique counts + correct totals, then all the problems would stop happening.

  • #2
    I can see the duplicates in the JSON response from the Network panel of chrome's dev tools.

    Comment


    • #3
      Hi.
      Please, answer questions
      Espo version?
      URL request?
      Expected result?
      Actual result?

      Comment


      • #4
        Espo Version: 4.2.7
        URL request: /api/v1/Contact?sortBy=name&maxCount=7&q=XXXXXXX
        Expected result: one contact returned
        Actual: two duplicate contacts returned

        Comment


        • #5
          I can't reproduce it. Could you reproduce it on demo espo and give me a link or screenshots (demo espocrm is cleaned twice a day, I can lose your data)

          Comment


          • #6
            I'll do this today, have been busy. Will need to provide screenshots

            Comment


            • #7
              Discovered it's caused by a custom patch against core. Sorry for the false bug report - at least I know where to look for the problem!

              Comment

              Working...
              X