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

REST API: Accessing Table 5809: Item Charge Assignment (Sales)

(5) ShareShare
ReportReport
Posted on by 24
We are trying to read/write table 5809 (https://learn.microsoft.com/en-us/dynamics365/business-central/application/base-application/table/microsoft.sales.document.item-charge-assignment-(sales)) via the REST API. This table has charge assignments for line items in Credit Memos that associate those credits as costs against the shipment revenue.
 
In the UI I can take a Credit Memo line like this and click on Item Charge Assignment:
to see the assigned charges like this:
 
I created an Web Services API Page for this table, but when I read it, I get back and empty data set.
 
How can I read/write this table from the REST API? What are the field names? 
 
The documentation link above does not even tell me the internal names for the fields.
 
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    16,318 Super User 2025 Season 1 on at
  • AH-01101805-0 Profile Picture
    24 on at
    REST API: Accessing Table 5809: Item Charge Assignment (Sales)
     
    Thanks for your suggestion.
     
    Yes, I am already clicking Item Charge Assignment as you can see:
     
    and the assignment is showing up in the UI:
     
    But we cannot see any values when we read the table via the OData API.
  • Suggested answer
    YUN ZHU Profile Picture
    82,673 Super User 2025 Season 1 on at
    REST API: Accessing Table 5809: Item Charge Assignment (Sales)
    Hi, The logic here is quite special. You can observe the data in table 5809.
    The system will insert data only when the Item Charge Assignment action is clicked.
    If it is not clicked, the table is empty.
     
    If you want to read it in the API, you must first run the logic in the Item Charge Assignment action.
     
    Hope this can give you some hints.
    Thanks.
    ZHU
  • Gerardo Rentería García Profile Picture
    18,643 Most Valuable Professional on at
  • AH-01101805-0 Profile Picture
    24 on at
    REST API: Accessing Table 5809: Item Charge Assignment (Sales)
    Sure @Yi Yong!
     
    Here is the API Page we created:
     
    When we make a request to it, we get back an empty set:
    {"@odata.context": "https://api.businesscentral.dynamics.com/v2.0/7895fb4c-6523-42f4-bb8f-dd61efb36d98/ixstaging/ODataV4/$metadata#Company('CRONUS%20USA%2C%20Inc.')/ItemChargeAssignmentSales2",
     "value": []}
     
  • Yi Yong Profile Picture
    2,058 Super User 2025 Season 1 on at
    REST API: Accessing Table 5809: Item Charge Assignment (Sales)
    Hello,
     
    It will be helpful if you can show us the pageAPI that you created along with the request+result.
  • AH-01101805-0 Profile Picture
    24 on at
    REST API: Accessing Table 5809: Item Charge Assignment (Sales)
    @Jainam M. Kothari this is interesting, but I do not see any table or page permissions (here: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-table-property-overview) that control whether a given table or page is accessible or modifiable from the REST/OData API.
  • Jainam M. Kothari Profile Picture
    7,921 on at

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

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

#1
YUN ZHU Profile Picture

YUN ZHU 374 Super User 2025 Season 1

#2
Mansi Soni Profile Picture

Mansi Soni 247

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 231 Most Valuable Professional

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans