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)
Suggested Answer

How to trigger onchange event on change of value from workflow.

(0) ShareShare
ReportReport
Posted on by 232

Hi all

i have the workflow which change the field value of entity in the form inside the form on change of this entity trigger the iframe which is not working can any one help how to trigger the onchange event on change of value from workflow

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    nghieppham Profile Picture
    4,755 on at

    Hi Tin Tin,

    You cannot trigger the OnChange from workflow.

    For the basic requirement, you can create action and call action from the workflow.

    Regards

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi Tin Tin,

    There are two things you need to understand here, workflow is on server, so field value is changed on database and it won't reflect to entity form unless you will refresh it. where as your onchange event is based on client side. So you may write a set interval method in javascript which can check value of the filed after specified time interval and can trigger your onchange event.

    Thanks

  • patelankitm1 Profile Picture
    on at

    I tested this solution on CRM trial site but was not sure if it's safe to implement on the production site. 

    Any advice if the javascript has any other dependencies that might break something. 

    Thanks,

    Ankit

  • Suggested answer
    RyanCPerry Profile Picture
    105 on at

    It would appear Microsoft may have changed the behavior on this at some point.  MSFT documentation I'd previously read indicated that only user changing a field should trigger the OnChange event, and that a JS set value would not trigger the OnChange.  What I didn't know / has changed is workflows triggering the OnChange.   As of 4/2017: I have workflows that are triggering field OnChange events upon completion of the workflow update record step.  - In fact, we weren't clear what was causing this "problem" as it was not a desired behavior - it was causing our JS timestamp function to fire and update the very field that triggered the workflow to run, creating the potential for an infinite loop.    

    User Change --> Triggers OnChange

    JS Update of Field --> Does NOT trigger OnChange

    Workflow Update Record --> Triggers OnChange

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