SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The target table 'torg' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause

MSSQL 2016

Hello All,

I have a table that needs to have a trigger. When I try to do an insert I am getting the below error.

I cant remove the trigger (isn’t an option).
I did this solution below to some tables:

I can’t keep using this solution. I need a clean and efficient way to solve this issue. And I would like also to be able to get back the new ID after the insert. With this my “solution” I am losing this possibility.

Please, could someone help me?

Thank you.