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 :
Microsoft Dynamics NAV (Archived)

Can you skip codeunits and insert directly to database directly from external application?

(0) ShareShare
ReportReport
Posted on by

Hey, I've only recently started developing on Microsoft dynamics NAV and someone suggested to me to write a C# application that writes directly into the database rather than consuming web services exposed in NAV. I have a feeling there could be something terribly wrong with doing that for a database being used by Microsoft Dynamics NAV but don't know what. Could that really work?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mohana Yadav Profile Picture
    60,993 Super User 2025 Season 2 on at

    it depends upon your requirement.

    if you are importing to an intermediate table and later process the data then it is fine.

    codeunits and table triggers will execute some code to calculate and validate..

  • Suggested answer
    Nareshwar Raju Vaneshwar Profile Picture
    5,596 on at

    Hi,

    You may write a C# code to directly write on the database. As Mohana said, if your requirement is not about checking validations or calculations, then you can though it is not recommended.

    Hope it helps.

  • _QWERTY Profile Picture
    10 on at

    Besides table triggers, you need to be aware, that your Server Instance don't know that you have been updating the data. If the data you have changed has already been Cached in your Server Instance, it won't be updated before you force it to update. So your users might get outdated data from your Server Instance Cache.

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 > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans