web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Power Automate Flow

(1) ShareShare
ReportReport
Posted on by 2
We need to create an automated flow that updates a customised column named last Activity date for Contact records(both existing and new) upon association with opportunity/quote/any activity.
We chose to create a power automate flow as this will provide us more flexibility. Now we tried to create an automated flow with trigger "when a row is modified or added" this worked fine, but won't apply to existing records in CRM. We need to update last activity date for all contact records.
Then we tried to create a scheduled flow- which worked for both new and existing as it updated for all records at the specified run time. The problem is we were using the respective modified on value of each contact record to fill its last activity date, but we found the modified on is getting updated with the flow run time and so the last activity date also becomes the run time. I tried capturing the initial value of modified on in a variable and then use that variable value to populate last activity date, however that worked temporarily only until a record is modified manually else the flow run time becomes the modified on value and hence the last activity date too.
 
Any ideas on how to resolve this?
I have the same question (0)
  • Suggested answer
    Muhammad Shahzad Shafique Profile Picture
    2,373 Most Valuable Professional on at
    Update custom "Last Activity Date" field on Contact based on actual related activities, opportunities, or quotes — not based on Modified On (which flow updates).

    1. Scheduled Flow (to handle all contacts):
    • Trigger: Recurrence (e.g., daily).
    • Action 1: List Contact records.
    • Action 2 (per contact): Use List Records to retrieve related activities (emails, phone calls, appointments, tasks, opportunities, quotes) via Regarding / Customer / Contact lookup.
      • Filter for Status = Completed/Closed where applicable.
    • Action 3: From all related records, get the most recent ActualEnd (activities) or CreatedOn (opportunity/quote)  dates.
    • Action 4: Update Contact's "Last Activity Date" with the latest date found from above.

    Note: Do NOT use Modified On — it always reflects the flow update and causes circular updates.
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans