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 :
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)
  • Suggested answer
    JAngle Profile Picture
    131 on at
    RE: Win/Lose Opportunity Through Odata API

    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.

  • Heem Othman Profile Picture
    5 on at
    RE: Win/Lose Opportunity Through Odata API

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

    Thanks.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,602

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 3,033 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,738 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans