#4: How to detect if Duplicate Rules are active You will have to decide how to pick the "winning" match from the different lists which will depend on your specific set of duplicate rules. This is complex since you get can get multiple lists of MatchRecords returned, especially if the lists don't have the same records and/or they are not in the same order. #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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |