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...
Answered

Custom Web Service constantly requires re-publishing

(0) ShareShare
ReportReport
Posted on by 70

I have a custom web service (codeunit) that I use in a Sandbox cloud environment, and I'm using it to return metadata on some of the properties in various tables. It was coded using the AL extension and it works, but at seemingly random intervals when I call the service it will return 404, at which point I just need to reopen VSCode and run the command "Publish and open in the designer". After that it will work again for a while before breaking again.

I suppose I have two questions: 

1.) What is the cause of this?

2.) If it's something I need to work around, is it possible to create a script that will publish that codeunit automatically when it breaks?

  • Suggested answer
    YUN ZHU Profile Picture
    85,883 Super User 2025 Season 1 on at
    RE: Custom Web Service constantly requires re-publishing

    Hi, Maybe it has something to do with the following.

    Important: Extensions that have been published from Visual Studio Code are removed when the environment is updated or relocated within our service. For more information, see this article on sandbox environments https://go.microsoft.com/fwlink/?linkid=2153804.

    pastedimage1654044559341v1.png

    pastedimage1654044604881v2.png

    Hope this helps as well.

    Thanks.

    ZHU

  • Suggested answer
    JAngle Profile Picture
    95 on at
    RE: Custom Web Service constantly requires re-publishing

    If you need the app long term then publish it via the UI. Vs code does tell you that apps installed in that way can be unpublished.

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans