There isn't any disadvantages, its just that: Formula field values are NOT stored in the database and are calculated after each time records are being read from database. If you can imagine, this can make things slow down. You see, even if values where not changed, formula calculation has still to be processed.
If you want to access latest value of formula in After Trigger, then instead of formula field, use a normal field and update it in trigger.
But there are quite a few limitations of it:
Fields are not allowed to be deleted if refer in Formula field.
By default, Force.com formula fields don’t have indexes. So when you create and use a formula field on very large objects (say, objects that have more than one million records), the SOQL queries and reports using the formula field as a filter might perform slower because your queries and reports have to perform full scans to find target records.
There isn't any disadvantages, its just that:
Formula field values are NOT stored in the database and are calculated after each time records are being read from database. If you can imagine, this can make things slow down. You see, even if values where not changed, formula calculation has still to be processed.
If you want to access latest value of formula in After Trigger, then instead of formula field, use a normal field and update it in trigger.
But there are quite a few limitations of it:
- Fields are not allowed to be deleted if refer in Formula field.
- Formula field cannot be a Long Text area
Hope this can help.Thanks,
Gaurav
Skype: gaurav62990
1) https://developer.salesforce.com/forums/?id=9060G000000I23VQAS
Consideration: Force.com Formula Fields and Indexes
https://developer.salesforce.com/blogs/engineering/2013/03/force-com-formula-fields-indexes-and-performance-gotchas.html
By default, Force.com formula fields don’t have indexes. So when you create and use a formula field on very large objects (say, objects that have more than one million records), the SOQL queries and reports using the formula field as a filter might perform slower because your queries and reports have to perform full scans to find target records.
Force.com SOQL Best Practices: Nulls and Formula Fields (https://developer.salesforce.com/blogs/engineering/2013/02/force-com-soql-best-practices-nulls-and-formula-fields.html)
Let us know if this will help you