![]() #3: How to deal with multiple Duplicate Rules for an Object Thus you must execute a separate query to get fields that are not in the CompactLayout. #2: Be aware what fields are returned in the MatchRecordįindDuplicates returns only the fields specified in the primary CompactLayout associated with the target object. In MatchRecord, the record contains the actual matched Object record. Each DuplicateResult object corresponds to an active duplicate rule for the object.Įach DuplicateResult record contains a MatchResults object.įinally, the MatchResults object contains a list of MatchRecord objects. It appears to be used for other types of errors which are not described in the documentation.Įach findDuplicatesResult object contains a list of DuplicateResult objects. So if a contact list was passed in, then fdresults corresponds to contacts, fdresults to contacts, etc.įindDuplicatesResult has a success property, but this is not related to active/inactive rules. Here are my tips for Duplicate Management with Apex.ĭuplicate results are returned in a complex hierarchy of objects.įindDuplicates() returns a list of Datacloud.FindDuplicatesResult objects where each element corresponds to the element in the list that was passed in. Matching rules can be configured by system administrator in Setup instead of being hardcoded in Apex. ![]() Now you can use the standard Salesforce duplicate rules in Apex. If you've built a custom Visualforce online form or other Apex integration that involves contacts, you've probably run into limitations with duplicate detection, especially since SOQL doesn't have fuzzy search capability. Today, we wanted to go deeper and share some advanced tips for the Salesforce Developer who knows Apex and is ready to take this to the next level. Sometimes it’s not enough to use a simple deduplication app or follow standard data cleanliness best practices, like the ones we gave here. As we launch into a new year, maybe one of your resolutions is to cultivate better deduplication habits.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |