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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Win/Lose Opportunity Through Odata API

(0) ShareShare
ReportReport
Posted on by 5

Hi,

I use business central cloud and I've exposed a few opportunity pages through the web service page so I can access the data through api and it works for the most part. My issue is when I want to close the opportunity, there's not really a way to do it. I've tried manually changing the status code but it says it's read only. I tried changing the values that I could, like "OptionWon" and "Close_Opportunity_Code" (these are from the Close Opportunity page) and those updated the percent correctly and it sets the entry to won but it still doesn't set the status of the opportunity to won.

I've seen some posts on here talking about LoseOpportunity and WinOpportunity entities but those look like they're On Prem only.

Any help would be appreciated.

Thanks.

I have the same question (0)
  • Heem Othman Profile Picture
    5 on at

    Yeah, that makes sense. I'll have to give it a shot.

    Thanks.

  • Suggested answer
    JAngle Profile Picture
    145 on at

    I think a purpose built unbound action is needed with a codeunit. Pass it the opportunity number and result. It goes on to  update the opportunity. Probably by repurposing the code which does this in the first place. I think a lot of it lives on a page.

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,928

#2
YUN ZHU Profile Picture

YUN ZHU 1,017 Super User 2025 Season 2

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 984

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans