2

I am working to build an automated process that will find two records that meet a set of criteria and merge the two records.

It seems like in a perfect world, there would be a pink "Merge records" element for that DML statement (which I understand to be an update followed by a delete operation).

Since there's not, I looked to create a DuplicateRecordSet record and two DuplicateRecordItem records connecting the two accounts I've queried. I can get that far, no problem.

But I haven't been able to find a way to use Flow to then process the merge between those two duplicate record items. I was hoping that at the most code-reliant, I'd be able to use an Apex Action to do so... but it seems like there aren't easy ways to code in the merge functionality without needing a UI component.

The latest attempt I've made has been just to pass the records I wanted merged into an Apex action like this one (but without the queries to identify the records): https://www.forcetalks.com/salesforce-topic/explain-the-use-of-dml-merge-operation-in-salesforce/

It just seems strange that I can't use DuplicateRecordSets or DuplicateRecordItems or any declarative functionality to accomplish this task. Has anyone done this more simply and easily?

New contributor
naptownbrown is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • Could you be bring in some more clarity in the question? Like where exactly are you stuck in this > But I haven't been able to find a way to use Flow to then process the merge between those two duplicate record items.?
    – arut
    Jun 24 at 7:20

0

Your Answer

naptownbrown is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.