Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Microsoft Unified Interface does not fire an onChange or onLoad event when a field is updated from a real time workflow.

Posted on by 10

Hello.

I have a Dynamics 365 org (9.1.0.3063) where I update a field on a form, which triggers a real time workflow.  The completed workflow updates another field on the form, which we use to execute JavaScript to set the form notification. This process works well with the default web app, but does not work with the new Unified Interface. My testing shows that updating a field with a real-time workflow does not fire the field's onChange or the form's onLoad events.

Can anyone confirm they are experiencing this as well, and perhaps offer a workaround?

Thank you for reading.

Ref: https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/events/attribute-onchange

*This post is locked for comments

  • StingRayYellow05 Profile Picture
    StingRayYellow05 10 on at
    RE: Microsoft Unified Interface does not fire an onChange or onLoad event when a field is updated from a real time workflow.

    Thanks for the feedback.  

    I tested a similar process in another environment, and experienced the same results.

    Here’s what I did:

    1. Opened a record in the web app (original interface)

    2. Manually changed a value in a field, and verified the onChange event fired.

    3. Manually changed a value in the same field, and verified the onChange event fired again.

    4. Opened a record in the unified interface (new interface)

    5. Manually changed a value in a field, and verified the onChange event fired.

    6. Manually changed a value in the same field, and verified the onChange event did NOT fire.

    It seems like the Unified Interface only supports firing the onChange event ONCE, as opposed to the classic interface firing onChange events multiple times.  

    I wonder if this is a bug with the new UI, or a change in the way that Microsoft is addressing these events.

    If anyone has a workaround (outside of reloading the record) please let me know.

  • Verified answer
    Kokulan Profile Picture
    Kokulan 18,048 on at
    RE: Microsoft Unified Interface does not fire an onChange or onLoad event when a field is updated from a real time workflow.

    Hi

    What is the version of Server and Client?

    I have tried this on Server version: 9.1.0000.3647Client version: 1.3.1576-190329-042235, and the onChange event fires.

    Here is what I did, a real-time workflow that triggers on Change of Email field on the contact and the workflow then updates the Mobile Phone field with Process Execution Time.

    On the form, I had both form load and mobile phone field change event wired displaying an alert with the respective event message.

    And the onchange event on mobile change actually fires after RTWF updated the value.

    ScreenClip-_5B00_444_5D00_.png

    ScreenClip-_5B00_442_5D00_.png

    ScreenClip-_5B00_445_5D00_.png

    ScreenClip-_5B00_444_5D00_.png

    Your OnChange may not be firing for the following reasons.

    01. Your script is not on the form that is rendered by Unified Interface - depending on the version of crm, Unified Interface may be rendering the Interactive Experience form but you have the script on the normal Main form that's why it works on Classic UI not on UCI

    02. Check there are no script errors in developer console in the browser

    03. Do you have any Business Rule bound to that field that has this onChange event wired?

  • gdas Profile Picture
    gdas 50,085 on at
    RE: Microsoft Unified Interface does not fire an onChange or onLoad event when a field is updated from a real time workflow.

    Hi,

    This is normal , when you update any field value using real time workflow it's basically changes the data in server side and JavaScript field on change event trigger in the client side . So there is no chances to work on change event of the field while  updating field using  RT 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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans