Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Apex Design Patterns

You're reading from  Apex Design Patterns

Product type Book
Published in Apr 2016
Publisher
ISBN-13 9781782173656
Pages 256 pages
Edition 1st Edition
Languages
Authors (2):
Anshul Verma Anshul Verma
Profile icon Anshul Verma
Jitendra Zaa Jitendra Zaa
Profile icon Jitendra Zaa
View More author details

Reproducing concurrency problems in Apex


Let's try to understand and reproduce a concurrency issue in Salesforce. In this chapter, we will take an example of a nonprofit firm, which is funded by many corporates. The fund information is saved in a custom object named fund account. This nonprofit company is in the process of going online and currently does not support a fund transfer using online payment gateways. Interested volunteers of different companies need to call the organization's contact number to provide information about their contributions. The custom object fund account stores the aggregated contributions of all the employees of a company. Now, the foundation has been set up; let's look at a simple case of a concurrency issue.

The following figure shows the schema of the custom object fund account:

Two employees of the company ABC call the customer service of this nonprofit organization at the same time. The already available fund of the company ABC is $10,000 and both the...

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 ₹800/month. Cancel anytime}