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...
Answered

Use API to export general ledger data

(0) ShareShare
ReportReport
Posted on by 15

First please excuse my ignorance of Business Central System , I am a 3rd party developer trying to produce a proof of concept. The client uses Dynamics NAV for accounting. They are currently using .csv export files to export entire general ledger to another application. I trying to find an easier method for staff to accomplish this.

I have successfully accessed the web API of the Cronos sample company. Is is possible to export entire GL , all fields using this method? If so can you provide details.

Thanks

I have the same question (0)
  • Suggested answer
    TakayukiIso Profile Picture
    45 on at
    RE: Use API to export general ledger data

    Speaking on the premise that you are accessing the API that published Page General Ledger Entries (20, List),

    Not all of the fields in Table G / L Entry (17) are present in Page General Ledger Entries.

    (For example, the field VAT Bus. Posting Group exists in Table but does not exist in Page)

    If you want to get all the fields of Table G / L Entry with API, I came up with two solutions.

    Plan.A: Create ListPage to display all fields Table G / L Entry and publish as API.

    Plan.B: Add the missing field as PageExtention to Page General Ledger Entries (20, List).

  • Bryanxxxx Profile Picture
    15 on at
    RE: Use API to export general ledger data

    Thanks for responding,

    Is there any online documentation you can point me to that will help me to understand some of your references. eg

    " published Page General Ledger Entries (20, List),"

    "Table G / L Entry (17)"

  • Suggested answer
    Olister Rumao Profile Picture
    3,967 on at
    RE: Use API to export general ledger data

    Hi Bryan,

    A more easier solution would be create a new page either in AL or C/SIDE with source table as Table G/L Entry and publish the page into webservices.

    To create page in AL refer docs.microsoft.com/.../devenv-pages-overview

    to create page in C/SIDE refer docs.microsoft.com/.../page-designer-walkthroughs

    To publish page as Webservice refer docs.microsoft.com/.../microsoft-dynamics-nav-web-services-overview

    Let me know if you need further help

  • Bryanxxxx Profile Picture
    15 on at
    RE: Use API to export general ledger data

    I was hoping there was a ready made solution as I have limited cooperation from admins.   The output from api.businesscentral.dynamics.com/.../generalLedgerEntries would give me what I want except I also need the fields:

    Bal. Account No.,Source Code,Entry No.

  • TakayukiIso Profile Picture
    45 on at
    RE: Use API to export general ledger data

    There are three kind of APIs provided by BC:

    API beta, API V1.0, and WebService.

    You seem to be accessing API beta.

    I think it will be confusing if I explain in detail,

    Can you try to access WebService as a practice?

    Follow the steps below

    Step.1  Publish the Page General Ledger Entries (20, List) as a WebServie

    "Page General Ledger Entries (20, List)" is the Page object that you see when you query General Ledger Entries on the BC screen.

    Please refer to the following URL provided by Olister and try to publish Page 20 with ServiceName like "GLEntries".

    docs.microsoft.com/.../microsoft-dynamics-nav-web-services-overview

    If Page 20 is already registered, write down the ServiceName.

    Step.2  Accesss the URL:

    api.businesscentral.dynamics.com/.../{ServiceName}

    If there is a required column, it is resolved above.

    If it is not enough, some development will be required,

    but since Page 20 includes Bal. Account No., Source Code, Entry No.,

    I think it's okay.

  • Suggested answer
    Olister Rumao Profile Picture
    3,967 on at
    RE: Use API to export general ledger data

    Hi Bryan,

    You can go into designer and see if the additional fields that you want are present.

    Designer: docs.microsoft.com/.../devenv-inclient-designer

    If they're present then most your work is done. You can then put the General Ledger Entries page into Webservices and use it.

    If not then some development is definitely required.

    Note: Designer works only in Sandbox. For production you need to migrate the extension created by designer to production.

  • Bryanxxxx Profile Picture
    15 on at
    RE: Use API to export general ledger data

    What exact page would I look at in design?  I looked at "general ledger setup" but that didn't seem to be what I want.

    Thanks, Bryan

  • Bryanxxxx Profile Picture
    15 on at
    RE: Use API to export general ledger data

    Ok I went to the "web services" page and added a new item, obj type "page" , obj id "20". it generated an url which seems to return GL entries with all fields.

    Is that right?

  • Verified answer
    Olister Rumao Profile Picture
    3,967 on at
    RE: Use API to export general ledger data

    Open General Ledger Entries through global search and then design from there and add the fields.

    And after design, you can add page 20 into Webservices and use the URL to get the appropriate fields.

  • Verified answer
    TakayukiIso Profile Picture
    45 on at
    RE: Use API to export general ledger data

    Yes, that's right.

    You can publish Page as a Webservice. 

    Finally, I will tell you how to check the page ID additionally.

    1. Open the page you want to check

    2. Open Page Inspection Pane (Shortcut key is  Ctrl + Win + F1)

    3. For example, for General Ledger Entries, General Ledger Entries (20, List) is displayed in the Page field. 20 is the Page ID.

    I think this will satisfy your needs.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
Sumit Singh Profile Picture

Sumit Singh 2,674

#2
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 2,580

#3
YUN ZHU Profile Picture

YUN ZHU 2,115 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans