Wednesday, April 20, 2022

Considerations for using Platform Events

Platform really helps in setting up custom notifications within salesforce or for external system. While utilising the platform events in salesforce, you need to consider below things:

  • Record Owner considerations

Whenever you create record from after insert using triggers, then ownerid of those records will be Automated Process by default. If you have set current user as record owner, then specify ownerid of created records as createdbyId of event.

Account acc= new Account(name='test account through Demo platform event',OwnerId = event.createdById);

  • Platform Event Trigger do not provide Email Support
As automated process user does not have email address, sending an email message from a platform event trigger using the Messaging.SingleEmailMessage class is not supported. As a workaround, send emails via email alert where the From Email Address is NOT "Current User's Email Address" but rather some other organization-wide email or default workflow user. 

In Apex, use the SingleEmailMessage.setOrgWideEmailAddressId method to set the org-wide email. 

Hope this will help!!

20 comments:

  1. Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
    you can visit us if you are looking for PEB Manufacturers

    ReplyDelete
  2. if you are looking for a Dell service center in Thane, then you have come to the right place. Whether your laptop needs a screen replacement or a motherboard emergency, Dell service center can help you get it back on track. In addition, they have all the necessary equipment to repair any model. From laptops to cameras, Dell provides comprehensive services for a wide range of devices. To learn more about the types of services offered by a Dell service center in Thane, click on the links below.
    dell service center in thane

    ReplyDelete
  3. This blog is really good... keep sharing such amazing post with us.
    If you guys are looking for the best and cost effective data migration services, master data management services, data integration services, and need advice for sap data management, you can contact our data analysis expert team. They will help you out with all your data concerns. Get in touch with them from - https://gluedata.com/

    ReplyDelete
  4. Thanks for sharing such amazing content. Really loved to read such content. Keep posting such content in future as well. assignment help online

    ReplyDelete
  5. My friend recommended I might like this web site Awesome and Great Content . He was entirely right. This post truly made my day. You cannot imagine simply how much time I had spent for this info! Thanks! :
    Intent sourcer

    ReplyDelete
  6. thanks for psoting this very valuable information check zong balance

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. Thanks for sharing your blog. In this Blog you have given an Informative Information which are very important for users.

    best shared web hosting

    ReplyDelete
  9. Nice Blog Sir, Its Very Helpful for me. Good Job & Keep it up.
    Intraday Trading Tips Share Market Expert Advisory Sharetipsinfo.com

    ReplyDelete
  10. Thanks for sharing your blog. In this Blog you have given Informative Information which is very important for users.WHMCS Template are used to reduce the time it takes to set up a new WHMCS installation. They can be used for different purposes, such as managing customer billing and payments, managing customer orders, tracking inventory, and so on.

    ReplyDelete
  11. I am very enjoyed for this blog. Its an informative topic.Amazing website, Must Visit Kashmir Tour Packages

    ReplyDelete

  12. Anytime & from anywhere you can avail effective solutions. Need is to just call on QuickBooks Phone Number Support +1 855-444-2233. For More Visit: https://g.page/qb-support-number-hawaii.

    ReplyDelete
  13. You can resolve your quicbooks related problem at Quickbooks technical support number +1 855-444-2233. we have a dedicated team which will sove your query in seconds.

    ReplyDelete
  14. great post, nice to read ,take new information and experience to read it HDFC bank share price

    ReplyDelete
  15. If you're looking for help in using it, just dial Quickbooks Customer Service +1 855-444-2233 to speak with a live representative.

    ReplyDelete
  16. If your laptop has a hardware issue, or if it is faulty, you need to visit a Dell service center in Borivali. They can fix any kind of problem with your laptop and provide software installation. They can also do data recovery and clean your laptop, if necessary. Regardless of the problem, you can rest assured that the technicians at the Borivali service center will do a top-notch job.

    ReplyDelete
  17. Whether you are just starting your company, working with a new vendor or just want to learn more about how QuickBooks works, dial Quickbooks Support Phone Number +1 855-444-2233 for help along the way.

    ReplyDelete
  18. With dedicated hosting, users have complete control over their hosting facilities, including the ability to change all critical settings and take full control of their server. We have chosen the Best Dedicated Server Hosting USA from which you can choose any preferred dedicated hosting service that meets all of your company's needs and budget.

    ReplyDelete