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

Updating data in tables in the SSMS

(0) ShareShare
ReportReport
Posted on by 15

Hello,

I've found the problem - when we update data in tables by the direct query in the database (SQL), new values are not displayed in web-client (or displayed only in list-pages).

For example my query is:

UPDATE TableName SET [Document Status] = 0 where [Document No] = 'X'

*[Document Status] is an option field in BC365

In windows-client i see new value in the [Document Status] field in document 'X'

In web-client i see:

- new value in the [Document Status] field in document 'X' on a LIST page

- old value in the [Document Status] field in document 'X' on a CARD page

What could be the reason? And how can we solve this problen?

(Clearing chache is not helping)

We are using Microsoft Dynamics 365 Buseness Central - 14.0.29530

  • Suggested answer
    Suresh Kulla Profile Picture
    47,773 on at
    RE: Updating data in tables in the SSMS

    The SelectLatestVersion is the method we used when somebody is making changes directly in the database, because of the cache NAV does directly reflect the data if the update is made directly using queries.

  • M Hussnain Javed Profile Picture
    241 on at
    RE: Updating data in tables in the SSMS

    Go to Windows>Services>Microsoft Dynamics 365 Business Central

    Now restart Microsoft Dynamics 365 Business Central Services and then again try to update data in tables through ssms

    If you've received your answer, please verify it to help others.

  • Mary Karceva Profile Picture
    15 on at
    RE: Updating data in tables in the SSMS

    Refreshing the page does not reflect.

    I've found that the SELECTLATESTVERSION function on OnOpenPage trigger helps. And I also know that this problem is about th database chache. But I still don't understand, how does it work...

  • Suggested answer
    Rbansode Profile Picture
    5 on at
    RE: Updating data in tables in the SSMS

    Does refreshing the page not reflect the updated data?

  • Mary Karceva Profile Picture
    15 on at
    RE: Updating data in tables in the SSMS

    There is no specific code on the card-page. I've created a new one List-page and card-page - the same result.

    Recompilation helps, but I could not compile objects every time after changing data in the database.

    This is not a usual practice for us to change data by direct queries.

    But I've noticed that specialty and it haunts me.

    By the way - I'm using Edge and Google Chrome.

  • Suggested answer
    Suresh Kulla Profile Picture
    47,773 on at
    RE: Updating data in tables in the SSMS

    Unless there is a specific code on the page that may reference that field value or calculating it.  Did you compile the page and table?

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

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

#1
YUN ZHU Profile Picture

YUN ZHU 499 Super User 2025 Season 1

#2
Sagar Dangar, MCP Profile Picture

Sagar Dangar, MCP 373

#3
Mansi Soni Profile Picture

Mansi Soni 327

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans