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

Creating Cust Ledger Entries with the API

(0) ShareShare
ReportReport
Posted on by 20

While I see there is a an OData call to retrieve Cust. Ledger Entries, how to I create a new Cust. Ledger Entry via the API? I'm not seeing anything for that

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,035 Moderator on at
    Creating Cust Ledger Entries with the API
    You can suggest this API functionality on this website and Microsoft will review your suggestion.
     
  • chrisgoman Profile Picture
    12 on at
    Creating Cust Ledger Entries with the API
    I think the main issue here is
     
     
    does not have the corresponding functionality on the customer side, meaning, there should be "Apply customer entry" but it does not exist
     
    How hard would it be for "any" BC developer (or Microsoft) to create this REST endpoing for API 2.0 since the apply vendor entry code is in Github already 

    BTW, the Apply vendor entry has some quirks (like the 1st apply sometimes does not work if the "documentNumber" is not blank, so you have to do it twice

    - Create 1st vendorPayment, apply clears the "documentNumber" but does not work. 
    - Delete 1st VendorPayment. 
    - Create 2nd VendorPayment (same exact thing as first one), apply now works
  • Suggested answer
    YUN ZHU Profile Picture
    90,179 Super User 2025 Season 2 on at
    RE: Creating Cust Ledger Entries with the API

    Hi, You can import pre-post data, master data and configuration data through APIs, but you cannot import posted data.

    So you can consider using the API to import data, and use the following two methods to automatically post. Of course, you can also customize a posting API.

    To set up background posting with job queues
    https://learn.microsoft.com/en-nz/dynamics365/business-central/ui-batch-posting#to-set-up-background-posting-with-job-queues

    How to use Configuration Package to post documents (Sales Order, Purchase Order, Transfer Order, General Journal, etc.) 
    https://yzhums.com/16530/

    Hope this can give you some hints.

    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,035 Moderator on at
    RE: Creating Cust Ledger Entries with the API

    I totally agree with Rahul here.  You can not insert anything directly into the customer ledger entry table. All the entries that should go in there needs to come as the result of posting documents or journals.

    And it is important that you understand the key concepts about how Business Central works and how the data ends up in the different tables before you start doing customizations or integrations with Business Central.

  • Suggested answer
    NAV_with_Narang Profile Picture
    2,250 Moderator on at
    RE: Creating Cust Ledger Entries with the API

    As rightly suggested by Mohana, no direct data entry should be done in Customer ledger entries, ask your Business Central developer to create a cash receipt journal page API for you and you can then enter data into this journal.

    In Detail:

    1. CLE (Customer ledger entry) is a table which records historical transaction data of all the transactions a customer/customers have. Including invoices, payments, refunds, etc. The data in this table is strictly used by Microsoft to further realize the GL value and link customers with Accounting

    2. Since this table's purpose is to store "transactional logs", the only way to enter data here is by either posting invoices or processing journals. The video below will highlight some of the processes (on how those are done physically in BC) www.youtube.com/watch

    3. Contact your BC developer and ask him to create an API type page of Cash Receipt Journal (if not already accessible OOTB by Web Services)

    4. Later, all that's left to do is publish this page inside BC's Web Services: learn.microsoft.com/.../web-services

  • Suggested answer
    Mohana Yadav Profile Picture
    60,635 Super User 2025 Season 2 on at
    RE: Creating Cust Ledger Entries with the API

    You have to fill the Journal line/documents and post from there. We should not directly insert data in ledger entry tables.

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,669 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,668

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,203

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans