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

How to Customize Rest Api for Item

(0) ShareShare
ReportReport
Posted on by 45

I FOUND A POST SAYING ITS NOT DOABLE

I have extended a table using AL in Vs Code.

something like this

tableextension 50119 MyItemExtension extends item
and i added this field
   field(50121; DIN; Text[100])
        {
            DataClassification = ToBeClassified;
        }

i modified the page for the item and i now see new field in the page.  Also if I create a webservice on the page i can see the new field in the OData returned.

What i would like to do however is modify the API

so when i do a get to 

api.businesscentral.dynamics.com/.../items

the new field is included.

I tried to play with the API Template by creating a new template which would include the new field, but it didnt work as far as i know

Do I need to create a custom API altogether ? or is there a way to add a custom field to the existing API

  • Suggested answer
    JAngle Profile Picture
    63 on at
    RE: How to Customize Rest Api for Item

    Another method you could try: community.dynamics.com/.../how-to-extend-business-central-api-without-extensions

    This is fine for a small amount of fields. The custom method seems best though. Copy the source code from here: github.com/.../APIV2Items.Page.al

  • Suggested answer
    Mohana Yadav Profile Picture
    60,199 Super User 2025 Season 1 on at
    RE: How to Customize Rest Api for Item

    we need to create custom APIs with required fields.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,884 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,760 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans