Solved

Update sql Query Acumatica

  • 16 March 2021
  • 2 replies
  • 572 views

Userlevel 2

Hello,


It’s possible to execute an update sql query by code in Acumatica?
I wanna update a field that exist in the database but not in the DAC

 

Thanks .

 
icon

Best answer by Hughes Beausejour 16 March 2021, 20:42

View original

2 replies

Userlevel 7
Badge +17

Hello Sadok,

This extended field might be available in “App_Runtime” folder in extended DAC. 

In your project solution, the same DAC you need to extend and add the same field and then by using this extended DAC, you can get this field in your graph and just do a cache update for that particular DAC.

 

Hope this helps!

Userlevel 5
Badge +2

There’s probably nothing blocking it:
Use Visual Studio with .NET and C# to query - Azure SQL Database & SQL Managed Instance | Microsoft Docs

However there is no built-in library in Acumatica to do so. Direct access to database bypass all security measures and increases risk of data corruption. The most direct method to interact with a database in Acumatica is the PXDatabase class. This requires a valid DAC class for minimal data integrity  validations: Direct Database Updates with PXDatabase – Acumatica.dev

Accessing directly the database from within an Acumatica customization is highly discouraged.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved