Overcome Salesforce Governor Limits Using Platform Events

Mixed DML’S Operations, Too Many SOQL Queries, Too Many DML Statements, CPU Timeout Salesforce’s Governor limits are there for a reason but even when you employ best practices you may still exceed them. A good developer will look at all tools available on the platform and find the best approach to solving the problem they are facing. Let see how to Overcome Salesforce Governor Limits Using Platform Events.

Join us to add the newest tool to your developer toolbelt using Platform Events to change the rules of the game and process more, faster, within governor limits.

difference between SObject and Platform Events

Like a superpower you didn’t even know you had. Here are difference between SObject and Platform Events

SObjects__cPlatform_Events__e
DMLs (Insert, Update, Delete)Publish (Insert only)
SOQLStreaming API
TriggersSubscribers
Parallel context executionGuaranteed order of execution

Platform Events

If you are new then please check out our platform event in Salesforce post.

Platform Events – Execution Timing

How to publish A Platform Event

Here is example how we can publish the event from Account Trigger.

Platform Event

How to Subscribe the Platform Event

Here is code which we created on platform event to subscribe it.

Overcome Salesforce Governor Limits Using Platform Events Video

Agenda:

  1. What are Governor Limits
  2. Synchronous vs. Asynchronous processing.
  3. Introducing Platform Events
  4. Platform Events processing
  5. Platform Events Considerations
  6. Example 1: Getting around Mixed DML limit
  7. Example 2: Changing multiple Apex Async Processes
  8. Other use cases
  9. Additional Resources
YouTube video

Please note that we have limit of 300 attendees that can join the online sessions. However, recording will be posted on our YouTube channel. Make sure to subscribe our YouTube channel to get notification for video upload.

FREE Salesforce Training

Summary

I hope this session helped you how we can use platform for to resolve governor limit in Salesforce. Also check Integrating with Salesforce using Platform Events to learn more.

Amit Chaudhary
Amit Chaudhary

Amit Chaudhary is Salesforce Application & System Architect and working on Salesforce Platform since 2010. He is Salesforce MVP since 2017 and have 17 Salesforce Certificates.

He is a active blogger and founder of Apex Hours.

Articles: 460

Leave a Reply

Your email address will not be published. Required fields are marked *