Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Run workflow to update field in same entity

Posted on by 25

Hello

This might be a stupid question, but I'm quite new to Dynamics CRM.

We are running Dynamics 365 On-premise.

I want to create a workflow which, when I change a field in the Sales Order Detail it automatically sets a value in another field in that same record.

Example 1: I have a field called cancel reason when an order detail gets canceled.

Another field called cancel date and I want the cancel date to automatically get the current date whenever the value in the field cancel reason gets changed.

Example 2: I have a field called customer on the Sales Order Detail. On creation of an order detail or modification of a specific field I want the workflow to update the field Customer on the order detail.

When I create a workflow (either background or not) and I select the Sales Order Detail entity, in the Update record steps I can only select related entities, not the current one.

Thanks for help.

*This post is locked for comments

  • Verified answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: Run workflow to update field in same entity

    Plugin gives you full control & in pre-update literally you can set the cancel date in the same Database transaction (single update statement) when status update is cancelled.

    This saves you a Database call & explicit service update. Also performance improvement, avoiding deadlock by update loop of no filter attributes, and best practice too.

    You cannot update child records from OOB WF, you have to use some 3rd party WF tools. This can also be achieved in post update plugin easily.

  • Verified answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Run workflow to update field in same entity

    Hi,

    I am afraid OOB workflow couldnt achieve what you wanted. As you experienced yourself, you cant see order product in update stage. So you have to create a plugin to do that.

  • JosiBu Profile Picture
    JosiBu 25 on at
    RE: Run workflow to update field in same entity

    Thanks for your reply.

    These are the Options I have there. Can't see default entity or something like that.

    670403.Capture.JPG

  • Rajesh Chungath Profile Picture
    Rajesh Chungath 465 on at
    RE: Run workflow to update field in same entity

    You can use the plugin on pre update to update the related fields.

    If you use workflow on update step under primary entity you can select the Current entity. (Default one if you add a update step to workflow)

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans