Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

Real Time Workflow not checking field value before change.

(0) ShareShare
ReportReport
Posted on by 230

I want to check if there is a bug in the current release Dynamics 365 CE V9 or if it is working as expected.  I've created a real-time workflow to fire before change of a field. The field is a lookup.  In the steps, I check the field being changed to confirm it wasn't blank previously.  Following the check condition, I run a child workflow against the record in the lookup field expecting the workflow to run against the previous value.  The child workflow fails because the previous value was blank.  This throws a Null reference error. 

Again, the question should the workflow run against the value of the field prior to the change (both the condition step and the child worklfow) or not?

Thanks for your comments.  

Categories:
  • semosby Profile Picture
    230 on at
    RE: Real Time Workflow not checking field value before change.

    Thanks Ravi. I understand the ability to process old values.  However, if you create a condition step will the condition step check to old or new value.  I believe the condition is checking the new value when it should check the previous value if the real-time workflow is set to start before the change of the filed.   Also, make certain you're firing the real-time workflow on change of one-field.

  • semosby Profile Picture
    230 on at
    RE: Real Time Workflow not checking field value before change.

    Thanks Ben.  I understand I can use plugins to do exactly what I want, but my question is regarding the workflow.  

    If the workflow is set to run before the change, what is being used in the condition?  I believe it is using the updated record for the condition and the pre-changed data in other steps.

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Real Time Workflow not checking field value before change.

    Hi,

    If you trigger the workflow before field change then it will contains the old value. This has been there since the release of Real Time workflow. Take a look at this blog from CRM 2013-

    mahenderpal.wordpress.com/.../capture-old-value-before-change-in-microsoft-dynamics-crm-2013-using-real-time-workflow

    Hope this helps.

  • Suggested answer
    Ben Thompson Profile Picture
    6,350 on at
    RE: Real Time Workflow not checking field value before change.

    oops duplicate post

  • Suggested answer
    Ben Thompson Profile Picture
    6,350 on at
    RE: Real Time Workflow not checking field value before change.

    How are you checking that the previous value was blank? Workflows only work with the data within the save request and look at the data as if it has already been saved so if the value of the field to be x, the workflow on checking the value will see that it is now x (even though you haven't saved it yet).

    To check that the previous value was blank you need to use a plugin or custom workflow activity where you can access and check the pre-image (previous image) of the entity and see what it looked like before the save request was made.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,430 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,043 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans