Does anyone know whether there's a existing package or repo that provides the capability to set up relatively simple syncing of a custom field history object?

The use case: There are two objects at play, Contact (standard) and Political Party (custom). Contacts are related to Political Parties in a many-to-many relationship, via the Political Party Affiliation junction object.

The Political Party Affiliation has the following key fields:

  • Start Date
  • End Date. Not having an End Date implies that the affiliation is current.
  • Contact (Contact__c)
  • Political Party (PoliticalParty__c)

There is a Lookup(Political Party) field called Current Political Party on the Contact object that I would like to keep synchronized for all records, based on the "history" tracked in Political Party Affiliations.

Users will not edit the Current Political Party field directly. Instead, they will be trained to create or edit the records in the Political Party Affiliations related list for each contact.

1 Answer 1


I think this is too custom for a general package to cover. You need to write a (simple) APEX trigger on the Political_Party_Affiliation__c object that properly updates the lookup field on each create/edit/delete of an affiliation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .