web
You’re offline. This is a read only version of the page.
close
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

How do I automatically export objects to GIT from C/SIDE?

(2) ShareShare
ReportReport
Posted on by 30

Hello guys,

do you have an idea how I can make it possible that objects from C/SIDE are automatically exported to our GIT, if e.g. a certain condition applies, like an object of the type table was changed, then this table should be transferred to GIT at night.

Is this possible automatically?

Is there a standard tool for this?

I have found this blog:

https://stefanmaron.com/2020/09/07/automated-export-objects-from-c-al/

Thank you ;)

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,634 Super User 2025 Season 2 on at

    Unfortunately, as far as I know, there has been no standard tool provided by Microsoft.

    You can schedule a Job to run a SQL query.

    https://learn.microsoft.com/en-us/sql/ssms/agent/schedule-a-job?view=sql-server-ver16

    https://stackoverflow.com/questions/5471080/how-can-i-schedule-a-job-to-run-a-sql-query-daily

    Hope this helps.

    Thanks

    ZHU

  • Suggested answer
    Greg Enns Profile Picture
    1,106 on at

    I like Stefan's approach because it only exports when an object is changed. That seems pretty great. Since you're asking here, it seems like you're wanting something else.

    Here is the script I've used for years to export any object marked as "Modified" from our local on-prem NAV. (I run this in the NAV Development Shell.)

    Remove-item -path '\\YOURFILEPATH\GitRepo\NAV' -include *.txt -recurse;
    Remove-item -path '\\YOURFILEPATH\GitRepo\AllObjectsExported.txt';
    Export-NAVApplicationObject -DatabaseName 'BC' -Path '\\YOURFILEPATH\GitRepo\AllObjectsExported.txt' -DatabaseServer YOURSQLSERVER -ExportTxtSkipUnlicensed -Filter Modified=yes;
    Split-NAVApplicationObjectFile -Source '\\YOURFILEPATH\GitRepo\AllObjectsExported.txt' -Destination '\\YOURFILEPATH\GitRepo\NAV\'

    This script: (1) removes all .txt files from the GitRepo folder (2) Removes the last file of all exported objects (3) Creates a new file with all modified objects as .txt (4) Splits that 1 file into 1 file per object.

    Originally I did not do the full delete of all objects from the Repo, but this means that if you flip an object to Modified = false, then it doesn't reflect that in the repo. This method is not fast or automated--although you could probably automate it if you wished. Again--I think Stefan's approach seems better, but you're clearly looking for an alternative--so hope this helps.

  • Maddin Profile Picture
    30 on at

    Thank you guys, I will test your suggestions and let you know, if I have been successful ;)

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,577

#2
YUN ZHU Profile Picture

YUN ZHU 888 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 778 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans