Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Automation of Chart of Accounts exports

Posted on by Microsoft Employee

I'm trying to automate our accounting system which currently is all manual exporting and excel configuration...

I would like to try and setup a script to autmatically export a chart of accounts for a given company in Navision direct to excel.

Seems pretty simple but im having trouble getting it to work, any help would be greatly appreciated.

Im pretty new to this and was asked to make it happen. from my understanding the chart of accounts is an aggrigation of over 180 tables in my specific NAV to a SQL querie would be obnoxious to say the least.. would love to have some kind of powershell script or VB script to accomplish this but have no idea how to get the chart of accounts for a given company exported..

thanks again

*This post is locked for comments

  • Suggested answer
    Ashwini Tripathi Profile Picture
    Ashwini Tripathi 4,624 on at
    RE: Automation of Chart of Accounts exports

    You can use many ways :

    Create a report and schedule via NAS

    Create Xmlport and schedule via NAS

    Create Jet Report

    Use Power View

    Use ODBC connection

    You can find few ways on my blog search for it.

  • Suggested answer
    RockwithNav Profile Picture
    RockwithNav 6,562 on at
    RE: Automation of Chart of Accounts exports

    Hey Vdemel,

    As Nareshwar and Alexander said going with report and then getting it executed from the Job queue will give more relief to you. Design a report with no RDLC layout but just C/AL code inside which will Export it Excel. Assign this Report to the Job Queue and schedule it as per your need. It will automatically keep saving the Report in excel format in the desired location.

  • Suggested answer
    RockwithNav Profile Picture
    RockwithNav 6,562 on at
    RE: Automation of Chart of Accounts exports

    Yes SQL ODBC would be one of the best way to export the data in excel. It would be comparatively much faster. 

    Having records like +90000 then usually I prefer from Excel ODBC. Even look and feel is too good.

  • Suggested answer
    RE: Automation of Chart of Accounts exports

    Hi Steve,

    Of course. You can use Excel ODBC and SQL Server to pass data in between. You can use Powershell for that purpose too.

    This is a good read: www.simple-talk.com/.../getting-data-between-excel-and-sql-server-using-odbc--

    But this question is more directed towards from NAV to Excel. That is why myself and Alexander answered in an angle how we can do it in NAV itself.

    Hope it helps.

  • Steve Henty Profile Picture
    Steve Henty 30 on at
    RE: Automation of Chart of Accounts exports

    I'm not a Nav User yet but soon will be, could an Excel ODBC query be the answer?

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Automation of Chart of Accounts exports

    Chart of Account - Balance is showing based on the single table  i.e G/L Entry.

    You can run SQL query from this G/L Entry table to get the desired result.

  • Suggested answer
    Alexander Ermakov Profile Picture
    Alexander Ermakov 28,094 on at
    RE: Automation of Chart of Accounts exports

    Agree with Nareshwar, you do not need many tables for that, but rather one table which is G/L Account. This table contains the list of all accounts, and those accounts have flowfields that sum up the data stored in the G/L Entry table, where all the accounting transactions are posted. You can use this information and generate a report and send data to Excel.

  • Suggested answer
    RE: Automation of Chart of Accounts exports

    Hi,

    You can develop a report and run the report dynamically/periodically using job queue.

    In that report, you need to add the G/L Account Table as a Dataitem, which is your CoA.

    Check out the blog post by Saurav, how can you design the report in order to send data to excel: saurav-nav.blogspot.com/.../nav-2013-r2-export-to-excel-report.html

    Starting with job queue, there are useful guides over MSDN. Start here:

    [1]: msdn.microsoft.com/.../hh879427(v=nav.80).aspx

    [2]: msdn.microsoft.com/.../hh879053(v=nav.80).aspx

    Hope it helps.

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans