Skip to main content

Notifications

Announcements

No record found.

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

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: How to debug BPF?

    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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans