web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Run a function on a specific business process step

(0) ShareShare
ReportReport
Posted on by

I need to move the business process stage to the next stage and set the next stage active when a specific step is set to "yes". I just don't how to add an event to that specific step.

Thank you!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Michel van den Brink Profile Picture
    4,697 on at

    Hello Barry,

    There's two ways you could take here:

      

    1. There is a functionality currently available in Preview called 'Action Step'
      This would help you accomplish what you are describing by allowing you to add a button to your Business Process Flow which can trigger your Action.

      Here's an article describing on how to enable this Preview feature and use in in your Business Process Flow.
      community.dynamics.com/.../step-action-in-business-process-flow-in-dynamics-365-july-2017-update-preview

      Be cautious though, this is a Preview feature! It might not work as expected all the time.

    2. If you are looking for a way to accomplish this without using Preview functionality, I suggest using a Workflow.
      You can trigger a workflow on the change of any field value, including the field that is associated to your Step.
      1. Create a workflow that triggers on 'Record fields change' and select the attribute you want to check and disable all other triggers (like 'Record is created')
      2. As the first step, check that the field you want to be set to Yes is actually set to 'Yes' because your Workflow will also be triggered when this field it changed to 'No', as Workflows can only trigger on any change to a field's value, not specific values.
      3. After checking if the field is set to 'Yes' use the workflow to perform your Action
      4. Be sure to set your Workflow on 'Scope: Organization' to make sure it triggers for everybody in your organization.

      

    Hope this gets you started. Let me know if you have any additional questions :-)

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Barry,

    You can simply call a javascript function on change of two option field. In the javascript function you need to write following.

    If option value is yes then save the data first and then move to next stage.

    Xrm.Page.data.entity.save();

    Xrm.Page.data.process.setActiveStage(stageId, callbackFunction);

    You need to provide stage I'd which you want to redirect .

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans