Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Workflow not triggering on field change

Posted on by 185

Hi All,

CRM workflow not working on field change, works on onsave of record 

but i need it on field change

4437672.Capture.PNG

If i use javascript field change the field Purchase timeframe is not available.

1663.Capture1.PNG

*This post is locked for comments

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Workflow not triggering on field change

    Hi ,

    I read through your question again, 

    In order for workflow to execute, you must save the field. 

    If you want to achieve on field change , you can use business rule or java script to achieve it. 

    Drag the purchase timeframe into form body then you will see the field if you go for javascript.

    community.dynamics.com/.../using-business-rules-to-hide-fields-and-make-them-required-as-needed

  • Suggested answer
    Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: Workflow not triggering on field change

    Hi Irfan,

    Are you saying that, everytime you have to save the record after changing the purchase timeframe field value in order to trigger the workflow. Then this is the expected behaviour of workflow.

    Only field change at UI level will not kick the database unless you save the record. Hence workflow will.not trigger on only change of field value.

    Same Case, when you change the field's value using JS, It does not trigger the workflow unless in JS you write the logic to save the record.

    Hope you understand..

    Mark this an answer. If it helps

    Cheers

    Arpit

  • Aman Anvaria Profile Picture
    Aman Anvaria 306 on at
    RE: Workflow not triggering on field change

    Hi,

    Fields in Header are not available for JavaScript.

    Please refer to this link for more information:

    https://community.dynamics.com/crm/b/crmandunifiedservicedesk/archive/2016/08/07/javascript-work-with-fields-in-header-and-business-process-flow

    Thanks & Regards,

    Aman Anvaria

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Workflow not triggering on field change

    Hi Irfan,

    How workflow will work on on field change ,  you should save the record and when field got changed after save  then only your workflow will fire.

    Please remember workflow trigger in stage 30 of event execution pipeline so until and unless you save the record the workflow will not fire.

    In summary if you want to some kind of functionality on change of field I would recommend go for business rules or java-script customization.

    Hope this helps

  • Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Workflow not triggering on field change

    Hi,

    You are using background workflow, it will wait some time then only run.  For testing purpose, would you mind to convert into Real time workflow and try again?

    Click into "Select" and screen shot the setting.

  • Mohammed Irfan Profile Picture
    Mohammed Irfan 185 on at
    RE: Workflow not triggering on field change

    it is an option set and i am selecting Immediate

  • Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Workflow not triggering on field change

    Hi,

    can you confirm is the purchase timeframe has value?

  • Mick_4711 Profile Picture
    Mick_4711 550 on at
    RE: Workflow not triggering on field change

    Is the field Purchase Timeframe placed in the header of your layout?

  • Mohammed Irfan Profile Picture
    Mohammed Irfan 185 on at
    RE: Workflow not triggering on field change

    yes

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Workflow not triggering on field change

    Hi,

    did you select the field via the 'Select' button?

    For Javascript, make sure you drag the purchase timeframe into form.

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