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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

ODATAV4 On-Premise 404 Resource not found for the segment

(3) ShareShare
ReportReport
Posted on by 79

Hello,

I've installed Business Central (BC) on my PC and am currently developing extensions for a cloud environment. Part of my work involves exposing codeunits as web services.

While I've successfully exposed codeunits as web services in the cloud, I'm encountering a persistent issue when attempting to consume a web service on my local BC instance. Specifically, I receive a 404 error stating: "Resource not found for the segment 'Astra_Results'."

Below is the codeunit I have exposed:

This is how it appears on the web services page:

Here is the Postman snippet for my request:

I've noticed that other OData URLs automatically configured by BC are functioning properly, but this custom service is consistently failing.

Could anyone provide insights into what might be causing this issue? Any help would be appreciated.

Edit:

The URL issue raised by Yun Zhu could not be the problem as I have confirmed from the official website: https://learn.microsoft.com/en-gb/dynamics365/business-central/dev-itpro/developer/devenv-creating-and-interacting-with-odatav4-unbound-action
I've also confirmed that that is the proper way of setting the URL to access the web service.

Additionally, the specific service "Loan" does not appear when I access the metadata for the ODATAV4 from my local BC, could this be a point of concern:

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,729 Super User 2025 Season 2 on at
    Sorry I'm not sure, but it looks like there is something wrong with the Service Name.
     
    Thanks.
    ZHU
  • Suggested answer
    Ramiz Profile Picture
    597 on at
    Hi,

    It looks to me a docker environment where you are trying to run it. If thats the case you need to put ?tenant=default in the URL.
     
    http://mysandbox:7048/BC/ODataV4/MyCode_ProcessRequest?tenant=default&company='CRONUS ES'

  • CU24061257-0 Profile Picture
    4 on at

     

    I had a similar issue — I was calling a method from the OData service and it wasn’t working. The problem was that, when I looked at the SOAP service, I noticed that a number was added to the method name. Once I added that suffix, it started working. 
    I named the procedure "PingPong", and in SOAP service it was "PingPong_4921716".

  • Suggested answer
    YUN ZHU Profile Picture
    95,729 Super User 2025 Season 2 on at
    PS: Dynamics 365 Business Central: Using OData V4 unbound action (Codeunit API?) to communicate and exchange data seamlessly
     
    Thanks.
    ZHU
  • Gerardo Rentería García Profile Picture
    25,236 Most Valuable Professional on at

    Hi, good day
    I hope this can help you, and give you some hints.

    Troubleshooting REST API/OData calls - Business Central | Microsoft Learn

     

    Best Regards
    Gerardo

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 2,135

#2
YUN ZHU Profile Picture

YUN ZHU 733 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 612

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans