web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

X++ custom script

(1) ShareShare
ReportReport
Posted on by 2

Hi,

I’d like to get an official clarification from Microsoft regarding a critical question that doesn’t seem to be explicitly documented anywhere.

 

Is it permitted to execute SQL kernel-level code within an X++ custom script deployable package for minor data correction activities in a Production environment?

 

I understand this approach is not recommended, but in some scenarios, converting the logic to pure X++ AOT objects results in significant performance degradation—particularly when temporary tables cannot be used (as they exist only within the original model). In such cases, a well-written and optimized SQL script can perform the operation far more efficiently.

 

Could you please confirm Microsoft’s official stance on this?

 

Thank you,
Ghulam Rasool

 

Categories:
I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,053 User Group Leader on at
    X++ custom script
    Hi,
    SQL execution is not recommended in general because one can damage the system data integrity for some of the following reasons.
    1) it skips table AOS methods.
    2) it skips the Delete Actions and other validation checks
    3) it skips any associated events, methods, x++ logic and everything and leads to direct SQL execution.
    People have made UI that directly executes the SQL queries on production, however that comes with the risk, as Microsoft does not support any issue occurred out of such executions.
     
    Is this some update that you want to perform in standard tables or are these any custom tables where you want to update the records? What is your business scenario. 

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 683 Super User 2025 Season 2

#2
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 620

#3
Martin Dráb Profile Picture

Martin Dráb 563 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans