Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Creating Cust Ledger Entries with the API

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

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 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
    chrisgoman 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
    YUN ZHU 73,698 Super User 2024 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
    Inge M. Bruvik 32,748 Super User 2024 Season 1 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
    NAV_with_Narang 2,236 Super User 2024 Season 1 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
    Mohana Yadav 59,139 Super User 2024 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans