Services calling services
In the previous chapter, I described a reuse use case around a FormulaForce application feature that awards championship points to contestants. We imagined the first release of the application providing a Custom Button only on the Contestant detail page and then the second release also providing the same button but on the Race detail page.
In this part of the chapter, we are going to implement the respective Service
methods, emulating this development cycle and, in turn, demonstrating an approach to call between Service layer methods, passing the Unit of Work correctly.
In Chapter 8, Additional Languages, Compute, and Data Services, we will take a deep dive into the advantages of leveraging Salesforce Heroku and Salesforce Functions to write and deploy code in different languages. While neither of these facilities offers the ability to package code – the ability to write Service classes that wrap such services will be explored further...