01Chapter 1: Two ways to calculate values declarativelySalesforce can calculate field values without code. The two main tools are formula fields and roll-up summary fields. Both give you read-only values that stay current without you maintaining them. They solve different problems and work in different ways. This chapter sets out the working model that 5 min read
02Chapter 2: Formula fields: read-only values with a return typeThis chapter covers how a formula field works, how to choose its return type, and what you can and cannot do with it. It assumes you know the basic Salesforce data model (objects, fields, records), can find your way around Setup and the Object Manager, and are comfortable with spreadsheet-style logi7 min read
03Chapter 3: Operators and everyday functionsThis chapter covers the operators and functions you will use in most formula fields. It assumes you can open the formula editor in Object Manager and that you know the return types from the previous chapter (Text, Number, Currency, Percent, Date, Date/Time, Checkbox). Branching with IF and CASE and 4 min read
04Chapter 4: Branching with IF and CASEFormulas become useful once they can make decisions. This chapter covers the two main branching functions, IF and CASE. It shows how to combine conditions with AND and OR, and how to choose between the functions. It also covers the mistakes that most often make a formula fail to save.4 min read
05Chapter 5: Handling blanks and avoiding divide-by-zeroThis chapter assumes you can write a basic formula field, know the return types (Number, Text, Date, and so on), and know that IF and CASE exist. It covers what a formula does when an input is empty and how to stop it from returning an error.5 min read
06Chapter 6: Reading fields from related recordsCross-object formulas let a formula on one object display or use values from records it points to. This chapter covers how relationship traversal works, the syntax for each direction, and the errors you will meet. It assumes you can create a formula field in Setup and know the difference between loo5 min read
07Chapter 7: Working with dates and timesThis chapter assumes you can create a formula field, choose its return type, and use the basic operators and functions from earlier chapters. It covers how Salesforce formulas treat dates and date/times, the arithmetic rules, the conversion functions, and the mistakes that cause wrong results.4 min read
08Chapter 8: Formula size and relationship limitsThis chapter covers the limits that cause formula errors in practice: how large a formula can be, how far it can reach across related records, and how to fix a formula that exceeds either limit. It assumes you can write formulas with IF, CASE, and BLANKVALUE. It also assumes you know how to use rela4 min read
09Chapter 9: Formula fields in SOQL and ApexThis chapter assumes you can create a formula field, know the basic SOQL SELECT and WHERE syntax, and can read short Apex classes. It covers how formula fields (and roll-up summary fields) behave when code reads them, and the mistakes that follow from that behavior.4 min read
10Chapter 10: Why roll-ups need a master-detail relationshipThis chapter assumes you know the Salesforce data model (objects, fields, records), can navigate Setup and the Object Manager, and have seen lookup and master-detail relationships at a high level. It explains why roll-up summary fields only exist on the master side of a master-detail relationship, a5 min read
11Chapter 11: Creating COUNT, SUM, MIN, and MAX roll-upsA roll-up summary field lives on the master record of a master-detail relationship. It calculates a value from the related detail records. This chapter shows how to create one and what each summary type does. It also covers the settings that cause the most mistakes.5 min read
12Chapter 12: Summarizing only the records you wantThis chapter covers roll-up filter criteria. It assumes you can create a master-detail relationship and a basic roll-up summary field. You should also be comfortable reading simple formula syntax.5 min read
13Chapter 13: When roll-ups recalculate and what gets lockedThis chapter assumes you can create a roll-up summary field on a master-detail relationship and write basic Apex or use Data Loader. It covers what triggers a recalculation, what doesn't, and why bulk loads sometimes fail with row-lock errors.4 min read
14Chapter 14: Roll-up restrictions and per-object limitsThis chapter assumes you can create a roll-up summary field and understand master-detail relationships. If you can't, review the chapters on those first. Here you learn what roll-ups can't do and where Salesforce caps them. You need this before you design a data model, because several limits are exp5 min read
15Chapter 15: Using roll-up values inside formulasThis chapter assumes you can create a master-detail relationship, build a basic roll-up summary field, and write a formula with IF and BLANKVALUE. A roll-up summary field gives a master record a stored number. A formula field can read that number like any other field on the record. Together they let5 min read
16Chapter 16: Aggregating child records on lookup relationshipsRoll-up summary fields only work on master-detail relationships. This chapter covers what to do when the child object is related by a lookup. It assumes you know how master-detail and lookup relationships differ, that you can create fields in Object Manager, and that you have read the earlier chapte5 min read
17Chapter 17: Choosing formula, roll-up, Flow, or ApexThis chapter assumes you can write basic formula fields, know how a master-detail relationship differs from a lookup, and have created a roll-up summary field. It does not introduce new syntax. It gives you a way to pick the right tool for a calculation before you build it.5 min read
18Chapter 18: Best practices and troubleshootingThis chapter assumes you can write formula fields with IF, CASE, and BLANKVALUE. It also assumes you have built a roll-up summary field on a master-detail relationship. Here you will collect the habits that prevent problems and a method for diagnosing the ones that still happen.5 min read