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

Business Central Web Service Error resource not found for segment

(0) ShareShare
ReportReport
Posted on by

Hi, 

I created a Codeunit in AL which contains the procedure "ReleaseSalesOrder" and exposed the Codeunit through a webservice called "SoExtFuncs". I have done this with many other codeunits before but for some reason this time i continue to receive "segment not found" when trying to access this function.

The url i attempt to access the procedure through is the following:

[POST <url prefix>/sandbox/ODataV4/SoExtFuncs_ReleaseSalesOrder?company=<companyId>

The codeunit and procedure are the following:

codeunit 50154 "So Ext Func"
{

  
  var
    myInt: Integer;
    release: Codeunit "Release Sales Document";
    
    
  procedure ReleaseSalesOrder(id: Text): Record "Sales Header"
    var
      SHR: Record "Sales Header";
  begin
    SHR.GetBySystemId(id);
    release.PerformManualRelease(SHR);
    exit(SHR);
  end;
  
  }

The webservice exposed:

Screen-Shot-2022_2D00_06_2D00_15-at-10.59.34-AM.png

Error: 

Resource not found for the segment 'SoExtFuncs_ReleaseSalesOrder'.

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    SOLUTION:

    unbound actions can only return type TEXT.

    Changed:

    procedure ReleaseSalesOrder(id: Text): Record "Sales Header"

    To:

    procedure ReleaseSalesOrder(id: Text): Text

  • Suggested answer
    Marco Mels Profile Picture
    on at

    Thank you for sharing!

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 2,164 Super User 2026 Season 1

#2
Dhiren Nagar Profile Picture

Dhiren Nagar 1,242 Super User 2026 Season 1

#3
YUN ZHU Profile Picture

YUN ZHU 1,197 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans