Open sungysang opened 4 years ago
FYI @Julian88Tex @Rodney-Zhu there is a fix for this issue in this branch: https://github.com/lovinghouston/lwcgoogleplacesbutton/tree/bug/ssong_internal_duplicates but Julian brought up a good point that same addresses may not necessarily mean duplicate churches, so will hold off on making a PR for this until it turns into a big issue for LH.
Reference: #40
Currently duplicate checks occur before churches are inserted, checking among the existing church Accounts. This means that no duplicate checking is occurring between the new records that are inserted, which could lead to duplicates if there's two similar church markers in Google Maps.
Potential Ideas: Go through the returned data (rawChurches) before the duplicate check occurs so that the list does not contain duplicates. Is there a Salesforce provided way/best practice to go through a List of records within itself to account for dupes?