Design: Streaming API -- Way to retrieve last successfully processed replay id from a pushtopic subscription
I'm using the streaming API to implement real-time data synchronization between SF and our backend data stores. If the backend service that subscribes to these pushtopics could be guaranteed to always run forever with no downtime, it might be ok, but reality is things happen, and even if they don't, updated versions of the service require that it be stopped temporarily. When it resumes, I'd really love a way to avoid having to have stored the last successful replay id to pass to SF, but am curious what that workaround might be. If I just say "give me everything in the last 24 hours", I'll need to implement something to de-dupe already processed messages, which is also not ideal, but, things seldom are.
Using the 'jsforce' module for a nodejs command line application on this one, using oauth username/password flow.
Is there any way to add an error to an record being updated in a trigger and send an email. The trigger needs to send an email (one per batch). The email works fine if the processing generates no errors and I do not use the addError method. If I use the addError method to pass a message back to the user then the email is not sent.
So is there a way to send an email and use addError in the same trigger code? If not is there another mechanism that can be used to pass a message back to the user interface (standard salesforce UI).
but is there a way to distinguish in the trigger whether it is before or after the Workflow has been evaluated, such as
Would this be a good idea?