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

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Solve business process flow

(0) ShareShare
ReportReport
Posted on by 694

Good morning,

I currently control Opportunity completion and business process flow only when the Opportunity meets a certain condition.

However, the Opportunity is won but the Finish button is only finished if I click manually, is there any way to finish either via trigger or javascript?

pastedimage1624892147629v1.png

I have the same question (0)
  • Esteban Coto Alfaro Profile Picture
    on at
    RE: Solve business process flow

    Hello, I recommend you to use the formContext functions, for example: formContext.data.entity.save("saveandclose");

    Check this link that contains many examples, check which one works better for you according to what you need:

    rkcrm.wordpress.com/.../

    Thanks!

    Community Support Team - Esteban

    If this Post helps, then please consider Accept as solution to help the other members find it more quickly.

  • Suggested answer
    meelamri Profile Picture
    13,216 User Group Leader on at
    RE: Solve business process flow

    Hi,

    You can use formContext.data.process.setStatus(status, callbackFunction) function. The status can be active, aborted, finished, or invalid. Please refer to the documentation:

    docs.microsoft.com/.../setstatus

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daniyal Khaleel Profile Picture

Daniyal Khaleel 156

#2
DAnny3211 Profile Picture

DAnny3211 89

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 74 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans