1

In our Org, we are using Person Accounts; so Joe Smith can have preferences, for example he only wants red cars when renting.

There's a duplicate Person, Joseph Smith, who of course only wants red cars.

When we identify that Joe & Joseph are the same people, and merge them, we end up having two preferences that are the exact same.

What would be the best way to tackle this? Aside from going into each Persons and checking to see if they have duplicate preferences.

Will it be done through a trigger?

0

You could just do a two-step process, if you want to continue using the standard UI for picking which field values to retain in the master record. The second step in the process would be to click a different button which goes to a custom page that shows potential duplicate child record, and allows the user to merge those.

If you want a one-step merge process, I think you will need to custom code the entire merge operation, including a UI for selecting the master record. In this case you can first invoke the merge operation and then manually check and process child records.

IMO the two-step approach is more manageable and allows you to leverage the standard UI, delivering value more reliably in a shorter amount of time.

| improve this answer | |
  • Thanks Marty, so just to make sure I am completely understanding you, the two-step process, just have a Button that pulls up a VF page which helps us merge duplicate child records? I know some of my developers are testing out a Tool that automatically merges two Persons based on a 'score'. So if I follow your option, I would have to have batch Apex run nightly to merge child records? – B Wayne Mar 3 '17 at 18:56
  • Yes, you can run batch Apex nightly as well to automate the de-duplication of child records. The service method could be something like AccountService.mergeDuplicateChildRecords(List<Id> accountIds). – Marty C. Mar 3 '17 at 19:08
  • Okay I'll have to get my dev team to try it out – B Wayne Mar 3 '17 at 19:19

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.