The out-of-box modifiedon field tells you when the last time any change was made to a record. The CRM platform creates and manages the modifiedon field for all built-in and custom entities.
See below the modifiedon field shows 3/31/2021 @ 4:05pm:
The problem with modifiedon is that any update to the record causes this date to be updated. The platform tracks all fields’ changes whether they’re updated by an end-user, some plugin, workflow or integration processes etc….
Even if you update a field to a value that is the same as the value it held previously, the modifiedon field will get updated to the current date/time.
These issues mean the built-in modifiedon has little real-world value. A poorly designed integration process could be running periodically and updating records with the same data that was there before and updating up the modifiedon date in the process. When was the last time the record actually changed? You don’t know.
There is a better way…
AutoMerge’s Modifiedon (gnb_automergemodifiedon) was designed to track if a change occurs to a custom set of fields on any entity. It works in conjunction with our plugin to watch for actual changes where the updated value written to a field is different from whatever the existing value was.
See below the earlier date of 1/26/2021 @ 2:53pm
The “AM ModifiedOn” field shows an earlier date because it is configured to update only when certain fields are updated. And by updated I mean actually updated to new values (or cleared of previous values)
We added this functionality to AutoMerge primarily for ranking purposes. When the AutoMerge analysis finds a duplicate set and you want the most recently updated record to be set to Rank=1 (in other words to win the eventual automerge operation) then it isn’t enough to use the OOB modifiedon field. For the purposes of ranking the records in the duplicate-set, we are only interested in changes to a small set of fields like: firstname, lastname, mobilephone, emailaddress1, etc… We dub these “Watch Fields”
How to turn on this functionality and configure the watched fields.
Steps to set up the automation:
Add an Update plugin steps for the entity you wish to track (this example for the Contact entity)
Then add a Create plugin step
This is mostly the same as the Update Step we did above with a few differences (highlighted)
Next – Edit the watch-field list in the AutoMerge-Configuration record corresponding to the entity you are working. When the above plugin steps fire, it looks for a watch-field AutoMerge-Configuration record associated with the Contact entity. If you have an active AutoMerge subscription you will find some default watch-field records for Account, Contact and Lead. You can edit those as necessary, or create your own.
Click open the Advanced Find and look for “AutoMerge Configuration” records. (No filtering criteria needed)
After getting the Results, open up the Contact-Watchfield-List record. Or create one if it doesn’t exist.
Finally – edit the config record, giving it a comma-separated list of schemanames for the fields you wish to watch for changes. In this example we are only watching the mobilephone field.
Now as new Contact records are created, the am_automergemodifiedon date will initialize to the create date, and from then on that date field will only update when the mobilephone field is updated to a new value (or cleared)
Initializing the am_automergemodifiedon date field for existing records.
All the Contacts that existed in your CRM system prior to your setting up this automation aren’t going to have anything in the am_automergemodifiedon field. If you want those dates initialized to something (example createdon), you will have to do it yourself.
One way to do that: you could create a simple workflow (or Power Automate flow) rule that copies the createdon date to the am_automergemodifiedon field, and use the XrmToolBox’s Bulk Workflow Execution tool to trigger that workflow on a defined set of records.
If you have an active AutoMerge subscription, we will do it for you. Just email email@example.com and we can initialize that field for you (since it is one of the fields in our managed solution). Tell us in simple terms how you want am_automergemodifiedon initialized. We can populate that field with any date field on that entity or a parent (N:1) entity or some time offset thereof. Or likely whatever date logic you can dream up.