Closed sungysang closed 4 years ago
Create new method that takes in the bulkData and returns a list of valid churches that are not duplicates.
This method will in the GooglePlaceUtility class and used in line 19 of GooglePlaces.
Currently the bulkData returns 5 results, but this should be changed so that it returns an indefinite amount. The results can be locked to 5 in the duplicate check, so it returns 5 non-duplicate Accounts.
The checkDuplicates method will use Datacloud.findDuplicates, so dupe rules/match rules can be used to check for dupes.
Duplicate results can be entered into the logs
Duplicate results may never show in the list of new churches/csps since those will be filtered out before dml calls are made
This has been completed. Great job @sungysang !
As a user, when I click "Find Churches" I do not want any churches or CSP records for churches created that already exist.
Finished Product: Comments on this spike with a recommendation implementation of how to handle Duplicates.
Notes:
Duplicates should occur after selectedRows are passed in.
https://idealistconsulting.com/blog/6-tips-duplicate-management-apex Questions: What should be done about duplicates? Notify the user? Second results component after the initial row selection that provides success/failures?