Coding-With-The-Force / Salesforce-Separation-Of-Concerns-And-The-Apex-Common-Library

This repo hopes to better explain Separation of Concerns for Salesforce and how to leverage the Apex Common library to employ it in your org.
88 stars 19 forks source link

Abstract domain classes #3

Open reignman5 opened 3 years ago

reignman5 commented 3 years ago

How do we handle for example record-type specific logic in the domain layer? Imagine I have an object that calculates a currency field oninsert, but this logic differs for the record-type.

Would I make the domain class virtual? Or would I put the record-type specific logic into the service class for that object?