Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

How "insert" method fire after insert records directly from sql server

(0) ShareShare
ReportReport
Posted on by 1,025

Hi Expert,

I do the direct insert records from SQL server in a custom table in ax 2012 

How can I do some logic in the insert method table? the insert method does not fire after direct SQL insert 

Thanks

  • Martin Dráb Profile Picture
    232,879 Most Valuable Professional on at
    RE: How "insert" method fire after insert records directly from sql server

    No, there is no way to execute logic inside a method that isn't called at all.

    This is just one of many reasons why using direct SQL statement is a bad idea, therefore the right approach is getting rid of it. If you explain your reasons for using a direct SQL statement, we might be able to suggest a better solution.

  • GirishS Profile Picture
    27,825 Moderator on at
    RE: How "insert" method fire after insert records directly from sql server

    I don't think there is any other possible way to achieve this.

    Thanks,

    Girish S.

  • source258147 Profile Picture
    1,025 on at
    RE: How "insert" method fire after insert records directly from sql server

    Thanks, Girish S for your reply

    Is there any possible way?

  • Suggested answer
    GirishS Profile Picture
    27,825 Moderator on at
    RE: How "insert" method fire after insert records directly from sql server

    Table level insert method won't be called when you directly load data through SQL.

    Also, it's not recommended to populate data to table through SQL.

    It's better to insert record into the table via X++.

    Thanks,

    Girish S.

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 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,137 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,879 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans