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 :
Microsoft Dynamics CRM (Archived)

Update field with its current value using an on-demand workflow

(0) ShareShare
ReportReport
Posted on by 154

Basically, I have a date field that when it is updated (onChange event) automatically populates two other fields: one field is the month and the other is the year. I'm doing this with JS in a web resource since it requires taking the date field and using .getMonth() and .getFullYear() methods.

This works fine on new records, but I need to update old records and going into each one, updating the date, isn't really an option. Thus, I'm trying to make an on-demand workflow that I can select the records in a view and run the workflow on just those. 

I'm not quite sure how to setup the workflow though.

  • Create Process
  • Category = Workflow; Entity = the entity I'm working with; Type = New blank process
  • Check "As an on-demand process"
  • Start when = "Record fields change"
  • Select the field to look for changes on ("Date Proposal Sent")
  • Add Step > Update Record > Set properties

From there I am kind of lost as to how to set the field to its current value. Also, now that I'm thinking about it, this might not trigger an onChange() event since I guess it isn't technically changing.

Should be handling this a different way? If not, how do I continue to set this up?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    Your approach should help to resolve your issue, its a good start. Please see below as to how you can create the workflow to do what you want.

    Since you are only using this workflow to update existing records, the workflow does not need to trigger on any record events. You will be triggering the workflow from advance find.

    First of all, to get Month and Year from DateTime value, there is no out of the box feature in workflow designer. You can use third party solutions, following is one of them.

    [View:https://github.com/jlattimer/CRM-DateTime-Workflow-Utilities/releases/tag/v2.3.0.0]

    Download the CRMDateTimeWorkflowUtilities_2_3_0_0_managed.zip solution and import onto your CRM instance.

    You can then create the workflow as shown below

    [View:/cfs-file/__key/communityserver-discussions-components-files/117/ScreenClip-_5B00_623_5D00_.png]

    Once you created and Activated the workflow, you can run this from Advance Find results window

    [View:/cfs-file/__key/communityserver-discussions-components-files/117/ScreenClip-_5B00_625_5D00_.png]

    If you have under few thousands of records, you could increase the page size to 250 in Personal Settings area and run this workflow against the records returned in Advance find.

    But if you have loads of records, meaning over 5K, you could use the XrmToolBox plugin to run the workflow against  the records. You can download the FETCH XML from advance find and paste the FETCH query in this tool and run the workflow against all the records in batches.

    [View:/cfs-file/__key/communityserver-discussions-components-files/117/ScreenClip-_5B00_627_5D00_.png]

    Let me know if you need any further help or guidance on this.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans