Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Optimizing Salesforce Industries Solutions on the Vlocity OmniStudio Platform

You're reading from   Optimizing Salesforce Industries Solutions on the Vlocity OmniStudio Platform Implementing OmniStudio best practices for achieving maximum performance

Arrow left icon
Product type Paperback
Published in Apr 2024
Publisher Packt
ISBN-13 9781835468470
Length 278 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Dmitri Khanine Dmitri Khanine
Author Profile Icon Dmitri Khanine
Dmitri Khanine
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1:The Platform Overview FREE CHAPTER
2. Chapter 1: Understanding the Vlocity OmniStudio Platform 3. Chapter 2: A Sample Application 4. Part 2: Getting to Know the Tools
5. Chapter 3: Evaluating the Performance of an OmniStudio Implementation 6. Chapter 4: An Introduction to Load Testing 7. Chapter 5: Tracking Code Changes and Deployment 8. Part 3: Best Practices for Improving Performance
9. Chapter 6: Options for Async Execution 10. Chapter 7: Understanding Caching 11. Chapter 8: Non-Selective Queries and Data Skew 12. Chapter 9: Improving the Performance of the Service Layer 13. Chapter 10: Improving the Performance of the Presentation Layer 14. Chapter 11: DataRaptor Formula Performance Considerations 15. Chapter 12: OmniStudio Performance Anti-Patterns 16. Index 17. Other Books You May Enjoy

Async execution options in Apex

In this section, we will do a brief review of the options available in the Salesforce platform itself for running code asynchronously. These can come in handy when you need to do a long-running operation inside a Remote Action or when you need to do some work outside of the OmniStudio framework, and in many other cases, thus allowing your business users to continue using the app without having to wait for operations to complete.

Apex @future annotation

The Apex @future annotation is a quick way to run a method asynchronously without delaying an Apex transaction. This is also great for making Web Service callouts, separating DML statements, and preventing mixed save DML errors, just like we did with the Chain On Step Integration Procedure setting earlier in this chapter.

To get an Apex method to run asynchronously, simply add the @future annotation before the method, as shown in the following screenshot:

Figure 6.12 – An overview of the static method with the @future annotation

Figure 6.12...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image