Activity Forums Salesforce® Discussions How can we Fire Platform Event From Batch Apex in Salesforce ?

  • How can we Fire Platform Event From Batch Apex in Salesforce ?

    Posted by Kirandeep on July 17, 2020 at 12:34 pm

    How can we Fire Platform Event From Batch Apex in Salesforce ?

    • This discussion was modified 4 years, 4 months ago by  Kirandeep.
    • This discussion was modified 4 years, 4 months ago by  Kirandeep.
    Anuj replied 4 years, 4 months ago 2 Members · 1 Reply
  • 1 Reply
  • Anuj

    Member
    July 17, 2020 at 12:42 pm

    To fire a platform event, a batch Apex class declaration must implement the Database.RaisesPlatformEvents interface.

    public with sharing class YourSampleBatchJob implements Database.Batchable<SObject>, 
       Database.RaisesPlatformEvents{ 
       // class implementation 
    } 

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos