Is there a way to determine if a trigger is being executed by an API call or through the Salesforce Web Interface?
I'd like to do something like this:
trigger Update_Last_Modified_By_API on My_Object__c (before update) {
for (My_Object__c o : Trigger.New) {
if (isAPI) {
o.Last_Modified_By_API__c = datetime.now();
}
}
}
(Currently using API version 25.0, though will soon be updating to 26.0)