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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Modified Date Field for a Specific Field

(0) ShareShare
ReportReport
Posted on by

Hello,

I would like to track the date that the Status Reason within the Opportunity entity is changed in Dynamics CRM 2013. Can anyone advise on a workflow that would input the current date in a custom field, say "Status Reason Change" when the Status Reason is updated? Essentially a modified date but only for one field. I am using this as a workaround due to the limited field history reporting available in Dynamics CRM.

Thank you,

Paige

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Modified Date Field for a Specific Field

    Great! Thanks mscrmba for all your help with this!

  • mscrmba Profile Picture
    on at
    RE: Modified Date Field for a Specific Field

    Hi Javier,

    Yes

    Changing the Status should be the last thing that is done.

    Making a quote or opportunity lost/won makes the record inactive / unable to be updated (unless it is activated again, which changes the status back to 'Open').

    You can have code that might update the record after that - but it'd be unusual, and if you haven't got any code that does that then you should  be able to rely on the modified date.

  • Community Member Profile Picture
    on at
    RE: Modified Date Field for a Specific Field

    Hi mscrmba,

    I am only using Quotes.

    Initially I had used the Modified On field as the date the Quote was won or lost, etc. But I thought that if any other modification, other than the Status Reason was done, then it wouldn't represent the date it was won, lost, etc. But now I just realized that it would represent it correctly, because in the report one of the criteria is the Status Reason = Won, Lost, etc. So if it's still Open or In Progress it will not be picked up if it's modified, and if it is Won, Lost, the Modified On will be the date that was changed because there is no other modifications allowed after it's in Won, Lost, etc. status. Sorry if this is confusiing, but am I right?

    Javier.

  • mscrmba Profile Picture
    on at
    RE: Modified Date Field for a Specific Field

    Hi Javier,

    The workflow you've already got working is capturing the active Opportunity status changes.

    The latest modified date could be used as a proxy for when the opportunity was won/lost (as it will show the last time someone modified the record - which should be when an outcome was known).

    Are you using Quotes or Opportunities or both to collect the data?

    Are you wanting to combine data from Opportunity & Quote into the same report?

    You could look at a workflow to update the opportunity (into new custom fields) with the value, and most recent date of any Quotes won, confirmed, lost, cancelled, passed).  However to be really accurate e.g. if the status might change, then a plug-in is normally better to do this sort of calculation (unless you were using 20015 calculated fields)

    An SSRS report could be generated - with code used to identify which records fit which categories, picking up data from the Quote (& most recent Quote Close and most recent Opportunity Close record) as well as the Opportunity record as necessary.

  • Community Member Profile Picture
    on at
    RE: Modified Date Field for a Specific Field

    Thank you, I appreciate your time put into this. Before researching further I will explain to you the general purpose that I have in doing this, maybe you have a different approach.

    The idea is to create reports on how many quotes were won or confirmed, and how many were lost, cancelled or passed, within the current month, year or week. This is why I had to record somehow the date that the Status Reason changed. Please let me know if you have any other idea to achieve this.

    Thank you again!

    Javier.

  • mscrmba Profile Picture
    on at
    RE: Modified Date Field for a Specific Field

    Hi Javier,

    "The Workflow is giving the error "The object cannot be updated because it is read-only"."....

    Have just been reading up - and normally you can update an inactive record with a workflow (which is what I had originally expected).  

    It must be because Opportunity is an OOTB entity with special status change processes that Microsoft locks it down (there are pages from Microsoft saying that they do do that).

    [View:http://social.technet.microsoft.com/wiki/contents/articles/8311.how-to-use-record-status-in-microsoft-dynamics-crm.aspx:550:50]

    So I think we have to revert to code. A plug-in can be added that would be able to run just before (or just after) Status change, to update the most recent status change date to now.

    See this on how to write a basic plug-in:

    [View:https://msdn.microsoft.com/en-us/library/gg594416(v=crm.5).aspx:550:50]

    Dates unfortunately do have some peculiarities:

    [View:http://stackoverflow.com/questions/22778978/crm-2011-date-in-plugin-and-dst:550:50]

    In summary:

    [View:http://www.magnetismsolutions.com/blog/paulnieuwelaar/2012/03/14/Set_Date_Time_Field_to_Now_in_Plugin_Dynamics_CRM_2011.aspx:550:50]

    Sorry I can't find a no-code solution.

  • mscrmba Profile Picture
    on at
    RE: Modified Date Field for a Specific Field

    The issue is that you want to capture the date of the win/loss into your 'Most Recent Status Update' field.

    Once the record becomes inactive it is triggering an error if you try to run a workflow across it (as we previously proved, earlier in this thread).

    You could have a checkbox for 'ready to close' that also triggered your first workflow (but that is a pretty poor/inaccurate solution).

    With code & ribbon workbench you can do anything (e.g. create a custom button that would trigger the field to update before bringing up a custom dialog etc), but I'm not sure how else to interrupt the OOTB win/loss/deactivation process (real time workflows are ideal to do that).

    Will have a think, and a play in a 2011 environment if I can find one, to see if I can suggest an alternative.

  • Community Member Profile Picture
    on at
    RE: Modified Date Field for a Specific Field

    I have 2011. That's why then. I wonder if there is a workaround. Is it strictly necessary to use that?

  • mscrmba Profile Picture
    on at
    RE: Modified Date Field for a Specific Field

    Hi Javier,

    What version of CRM are you on?

    The capability was introduced as part of CRM 2013.

    The instructions above are valid for 2015 or 2013.

    If you're on 2011 it's not available.

  • Community Member Profile Picture
    on at
    RE: Modified Date Field for a Specific Field

    Thank you! I got stuck in the 2nd workflow because I don't have the "Convert to a real-time workflow" button.  Not sure why that could be.

    Javier.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#3
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans