I am trying to import some data on a particular object, hence is there a way to check which of our objects are tied to triggers, flows, etc.
You can review the existing triggers from Setup | Develop | Apex Triggers, and review the Sobject types to determine the base object.
You can review all existing Workflow Rules from Setup | Create | Workflow & Approvals | Workflow Rules, and review the Object list to determine the base object.
You can review all existing Processes from Setup | Create | Workflow & Approvals | Process Builder, and review the Object list to determine the base object.
Unfortunately, Flows will likely have to be opened individually to determine their base object.
One option not mentioned is to use the tooling API to query the ApexTrigger metadata object. You could do this directly, or by using the Salesforce CLI's
To query the tooling API using the Salesforce CLI the command would be as follows:
sfdx force:data:soql:query -u MyOrgAlias -t -q "[my query here]"
The direct REST endpoint is found at
I could issue the following query, for instance:
SELECT Name, TableEnumOrId, NamespacePrefix, ApiVersion, Status, IsValid FROM ApexTrigger WHERE TableEnumOrId = 'Account'
This would return to me all account triggers and the information about them.
If I just wanted a list of all sObjects that have triggers and a count of their triggers, I could do this:
SELECT TableEnumOrId, Count(Id) FROM ApexTrigger GROUP BY TableEnumOrId
Unfortunately, not all of the other business process tools are as easy to inspect.
There is a config object for flows and process builder called
FlowDefinition but I think you'd have to inspect the metadata field and parse the XML to see that.
There may be an object for workflows and approval processes (
BusinessProcess maybe), but again not obvious.
Finally, the SetupAuditTrail is now API enabled and queryable. I've played around with creating different views of this. But this will only help you if:
- The creation of the metadata item took place in the last 6 months
- Or you've been backing up your Setup Audit Trail on a regular basis
Viewing the setup items for that object is certainly one way.
But you can also try to do this a in a refreshed Sandbox environment, and check the debug logs for the triggers, workflows, validation rules and flows invoked. Keep the developer console open, and do the data import. Check the logs for all the items invoked. You can also add Debug Logs under Setup->Monitor->Logs->Debug logs. Do the data import in the sandbox and come and check the logs created here.
The reason to do in Sandbox is that in case you are afraid to mess up some data in Production.