0

I cannot find the information I need about this. What i am trying: Add some records to Account object with Batch and checking errors if Platoform Event. So if records added i want to write in platform event "Succesfull" and vice versa. I just want to know how to do it. Some guides would be perfect.

UPD: Or i must just use batch as always and catch error with try-catch and then write to event?

5
  • You want to initiate a platform event regardless of the outcome (success or failure)? The developer guide for Platform Events is a good starting point.
    – nbrown
    Apr 26 at 16:51
  • @nbrown yeah. I read this, but didn't found, But i will look again, thanks.
    – Elrion
    Apr 26 at 16:53
  • 1
    Is this what you're looking for? The benefit of this approach is that it handles both catchable exceptions and governor limit issues.
    – Phil W
    Apr 26 at 17:05
  • @PhilW I think it works for me, but i am trying to make it with my own event.
    – Elrion
    Apr 26 at 17:14
  • 1
    To handle governor limit issues you have to use this standard event.
    – Phil W
    Apr 26 at 17:29

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.