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)

How to debug BPF?

(0) ShareShare
ReportReport
Posted on by 410

I want to do some actions when the NEXT button is clicked in a business process flow, i have followed thebelow thread :

https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/164681/call-some-javascript-when-click-next-button-of-business-process-and-call-another-javascript-when-click-on-back-button

and implemented the below code, just to get the current Active stage before performing my action, i registeredd this code on the onLoad event of the BPF entity, but i cant seem to find the script in my debugger when I load the entity the BPF is registered against. some with better knowledge, please help. Cheers

function updateDate(context) {
var formContext = context.getFormContext();
formContext.data.process.addOnStageChange(onStageChange)
}

function onStageChange(context) {
var formContext = context.getFormContext();

if (ExecutionContextObj.getEventArgs().getDirect() == "next") {
var activeStage = formContext.data.process.getActiveStage();

if (activeStage) {

}
}
}

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi,

    Write debugger; in the JS functions and  then trigger event in which you registered.

    community.dynamics.com/.../java-script-debugging

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