Personalized Community is here!
Quickly customize your community to find the content you seek.
Check out the latest Sales updates!Learn about the key capabilities and features of Dynamics 365 Sales and experience some of the new features.
Download overview guide | Watch Sales video
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
I have created a custom field on the contact record to capture the last activity date.
I have also created a workflow to update the last activity field with the modified on date of a phone call. This all works as expected and the last activity field on the contact updates correctly when entering a new phone call.
However for pre-existing contact records with phone calls created in the past when I run the workflow as an on demand process it updates the last activity date to a random modified on date rather than the latest modified on date.
For example if I have a contact with three past phone call activities logged against it and the different modified on dates for the phone calls are 03/03/2019, 01/02/2018 and 11/01/2020, when the workflow is ran it updates the last activity field with 03/03/2019 and I need it to update the last activity field with the most recent modified on date being 11/01/2020.
Any suggestions as to what else I need to do?
Can you please screenshot your workflow's logic and config.
I think that you have to use some c# code to sync your pre-existing data. Maybe a console application. You can use also Ms flow for this scenario.
It sounds like the workflow is not necessarily running on the Phone Call records in chronological order for each Contact. Try adding a condition to the workflow step that compares the Contact/Last Activity Date to the Phone Call/Modified Date, so that the Contact record is updated only if the Phone Call/Modified Date is greater (more recent) than the Contact/Last Activity Date.
Bear in mind that other processes, like workflows and plug-ins, could potentially modify the Phone Call record after it is completed. Consider using the Actual End date instead of Last Modified.
Gary LetterNextLevel Business Systems
If you find the answer useful, please click "Yes" to mark it as verified.
Business Applications communities