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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Calculating the date of first contact in an opportunity.

(0) ShareShare
ReportReport
Posted on by 155

Hello,

I'm currently trying to create a field in the opportunity entity that calculates the date that an opportunity was first contacted. Or alternatively a field that tells me how long it took to make first contact (either is good).

So far I've created two new fields, 1 'today's date' (=now() calculated field) and 2 'date of first contact'.

I've then created a workflow which triggers when the first call is made. (We have a field called 'calls made', which as you can guess, calculates how many calls (or emails) are made on the opportunity. It is worth noting here that there is a separate workflow in place which creates a new activity (phone call or email) each time certain fields are changed.) So the new workflow inputs 'today's date' into the 'date of first contact' field when the calls made field changes from 0 to 1.

Now this is fine, i bit fiddly, but works. However you can't calculate the date of first call for opportunities where there has already been 1 or more calls made. Except by extracting the number of phone calls into excel, de-duping the data, and then a calculation of: created on (for phone call) - created on (regarding opportunity).

Does anyone have any suggestions of how to overcome this without script? 

Kind regards,

Mike.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Robert Wittig Profile Picture
    1,885 on at

    Mike,

    Instead of a workflow you can use a rollup field, similar to the one below.

    6305.Capture.PNG

    Then to calculate the time between creation and the first call you can use a calculated field calculating the date difference between the value in the rollup field and the opportunity created on.  The blog describes how to use a calculated field to calculate the difference between two dates.  https://wittigcrm.wordpress.com/2016/04/19/calculate-age/

  • Michael Violette Profile Picture
    155 on at

    Hi Robert, this is exactly what i'm after. I've created this in Sandbox now, but just wondering, can i get the roll up field to calculate for closed opportunities?

    Many thanks,

    Mike.

  • Robert Wittig Profile Picture
    1,885 on at

    I will be honest, I haven't tried it but I cannot think of a reason why it would not work.  The opportunity when it is closed is read only but a rollup field doesn't actually write anything to the opportunity technically.

    In addition I have similar methodologies deployed at clients and I haven't heard anything about it not working correctly...I wish I could remember if it was a specific use case we tested.

  • Michael Violette Profile Picture
    155 on at

    After exploring this further i still can't find a way for the rollup field to generate the 'First contact date' for closed opportunities. The system Job doesn't seem to populate this field. This would effectively mean having hundreds of thousands of records where i don't have the first contact date/days taken to make first contact.

    Anyone else have any ideas?

    Regards,

    Mike.

  • Verified answer
    Robert Wittig Profile Picture
    1,885 on at

    Mike,

    The rollup fields are not real time, they only recalculate every 12 hours or when manually updated by pressing the recalculate button (which you cannot do on a closed opportunity).

    When the mass calculation system job executes, the field value will be updated.

    If you want to manually execute the job, you can go to system jobs and under view select Reoccurring System Jobs.  Locate the system job called Mass calculate the (entity.fieldname) rollup field, open the record, then go to actions resume.

    I just tested this on a 3 closed opportunities and each of them updated.

    85253.Capture.PNG

    Thanks,

    Bob

  • Verified answer
    Community Member Profile Picture
    on at

    A great approach, definitely my first thought for this.

    Just to be clear, a new rollup field is mass calculated by a system job 12 hours after the field is created (or updated).

    Once that is done, there is a system job per entity that runs every hour to update rollups where reocrds have changed.

    Also a rollup field *does* actually write to the record (maybe you were thinking of calculated fields which don't store values anywhere)

  • Robert Wittig Profile Picture
    1,885 on at

    Adam,

    Thanks for the correction, I was thinking calculated fields, either way though the solution works nicely.

  • Michael Violette Profile Picture
    155 on at

    Thanks Robert I understand were I was going wrong now. I was being inpatient! So i just needed to wait 12 hours until the first calculation, after which you can use system jobs to manage the calculation.

    Adam thanks for clarifying.

  • Inogic Profile Picture
    748 on at
    Please refer below link to use rollup field, for calculate time difference.
     
     
    Thanks,
     
    Sam

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans