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...
Suggested answer

Table extension fields standard API header field sets correctly, detail field does not set.

(6) ShareShare
ReportReport
Posted on by 12
I have created two table extensions in AL for boolean fields, one for table 38 Purchase Header and one for table 39 Purchase Line. I've added those fields to my page extension and they both show up on the page Purchase Invoice. When I do a POST request in Postman for Purchase Header, this new field sets correctly. When I do a POST request in Postman for the Purchase Line, there is no error and the record is inserted but does not set the boolean field at all. There are no errors. Pretty simple field and passing true for both but only the Purchase Header sets true for the new custom field. Why would one set fine but not the other? Is there a difference? I am using the standard api for both. Don't know why one would work and not the other?
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    89,902 Super User 2025 Season 2 on at
    Table extension fields standard API header field sets correctly, detail field does not set.
    Hi, from the error message
    "message": "The field Document No. of table Purchase Line contains a value (108179) that cannot be found in the related table (Purchase Header). 
    It seems to be a problem with the code. I hope the following discussion can give you some hints.
     
     
    Thanks
    ZHU
  • YM-02091915-0 Profile Picture
    2 on at
    Table extension fields standard API header field sets correctly, detail field does not set.
    Thank you, everyone for the help. I have decided to go to custom api route. I said the wrong terminology at first. I apologize. I was not using standard api. I was using the page ui endpoints. I still would like to know why it would fail to set my custom field? The web service page endpoints I was using was Page object 51 Purchase Invoice and Page object 55 Lines. Object 51 set my custom field fine, but Object 55 ui page endpoint would not fail but not set the custom field. I am moving out of using the page ui endpoints as Yun Zhu stated they would be obsolete soon.

    After changing my Page UI endpoints to my custom api endpoints. I get a new error. Again the Purchase Invoice custom api sets my custom boolean field correctly, but I get now for my custom api for the Lines.
     
        "error": {
            "code": "Internal_InvalidTableRelation",
            "message": "The field Document No. of table Purchase Line contains a value (108179) that cannot be found in the related table (Purchase Header). 
     
    Thank you everyone for helping. Yun Zhu your articles I have been following for a couple years now. Always have been very helpful. Thank you for the links. Thank you Sohail, Sumit, and Khushbu as well for your responses.
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    18,914 Super User 2025 Season 2 on at
    Table extension fields standard API header field sets correctly, detail field does not set.
    Standard APIs in Business Central are not extensible. That’s why your header field seemed to “work,” but your line field didn’t. The correct way is to create a custom API page
  • Suggested answer
    Sumit Singh Profile Picture
    3,128 on at
    Table extension fields standard API header field sets correctly, detail field does not set.
    Hi, 
     
    Sharing few official links which might help:- 
     
     
     
    Mark the Boolean true “Does this answer your Question” if this was Helpful.
  • Suggested answer
    Sohail Ahmed Profile Picture
    10,975 Super User 2025 Season 2 on at
    Table extension fields standard API header field sets correctly, detail field does not set.
    As of now, standard APIs are not extensibl
  • Suggested answer
    YUN ZHU Profile Picture
    89,902 Super User 2025 Season 2 on at
    Table extension fields standard API header field sets correctly, detail field does not set.
    As of now, standard APIs are not extensible, even if you add fields to the page. Because the API Page is a separate page, you can't add fields at the same time.
    Dynamics 365 Business Central: Can we extend standard APIs? – Download Standard Source Code for APIs
     
    n addition, in future versions, BC standard pages will not be able to be published as Web Services.
     
    Hope this helps.
    Thanks.
    ZHU

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,869 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,484

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,242

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans