I Have (after insert, after update) trigger on Account sObject. When I manually inserting or updating Account trigger fires, also when I updating existing Account via REST API request it fires too. But when I creating new Account via REST API using INSERT or UPSERT methods trigger is bypassed. Even if trigger contians just one line: System.debug ('trigger fired')

Can't find any relevant info that can help to determine the problem. Maybe there is some restriction or settings to allow firing after insert by REST API?

  • 2
    This shouldn't be possible, triggers will be fired regardless of the way the DML (insert update delete undelete) is happening. – pjcarly Nov 21 '14 at 9:39
  • I've been having this exact same issue. From everything I see, the trigger is set up properly and my inser/upsert on the triggered record is working properly, just the trigger isn't firing. I have a "sendEmailTrigger on EmailMessage (after insert)" instantiation that works when adding a new EmailMessage to a case through the web portal, but when adding the record via REST API the trigger is never fired. I wonder what could cause this, it's really been impeding the progress on my development. – user13518 Dec 2 '14 at 18:16
  • 1
    @PJC It's actually possible. I'd have to check with my Admin about which App it is (could be DBAmp or another, I can't remember), but there is a setting on there that essentially tells triggers to not fire. – dphil Dec 2 '14 at 20:32
  • Can we see the trigger code? Might be a simple order of operation issue. – HomerJ Jan 5 '15 at 16:20
  • @dphil DBAmp has its own specific settings that control whether certain actions are triggered or not. I agree with Pieterjan Carly: triggers are always fired, depending of course on whether an object reaches that stage in the order of execution. user13281: stupid question, but is the trigger Active? – Sander de Jong Apr 14 '15 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.