Hi everyone,
Regarding to title, I would like any ideas.
Apex execute insert record and unexpectedly soql queries. but my org doesn't set up trigger and there is disabled flow.
Why is this happening? Does anyone have any ideas?
I would appreciate it if you cloud help.
If you are observing unexpected SOQL queries being executed even though there are no triggers and flows are disabled, there are a few potential reasons you might want to investigate:
- Apex Debug Logs:
- Enable debug logs for the user who is running the Apex code. This can be done by navigating to Setup > Monitoring > Debug Logs. This will provide detailed logs that show the sequence of operations and any SOQL queries being executed.
- Apex Code Itself:
- Review the Apex code that is being executed. There might be explicit or implicit queries in the code. Look for any DML operations, queries, or any method calls that might internally perform database operations.
- Triggers in Managed Packages:
- Check if there are any managed packages installed in your org that might include triggers. Even if your org hasn’t set up custom triggers, a managed package might have its own triggers that get executed during certain operations.
- Process Builder or Workflow Rules:
- Ensure that there are no active Process Builder processes or workflow rules that might be executing additional actions, including SOQL queries, when records are inserted.
- Asynchronous Processes:
- Check for any asynchronous processes like future methods or queueable jobs that might be running after the initial record insertion. These processes could include SOQL queries.
- Platform Events:
- If your org uses platform events, check for any triggers or processes associated with the events that might be causing additional queries.
- Apex Debug Logs: