You need to sign in to do that
Don't have an account?
Upendra
What is the disadvantages of a formula field compare to text field?
I want to populate a parent field value in a chaild field for displaying in a standard visual force page. So, I thought I will create a formula field for the same, but one of my collegue said don't create formula field, create a text field and assign the text field value while creating the child record in trigger.
So, I just want to know, which approach is better and why?
NOTE: The parent child relationship is lookup relationship.
So, I just want to know, which approach is better and why?
NOTE: The parent child relationship is lookup relationship.
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.
As your friend suggested, it is better to write/update the value during trigger. Thus saving you a process time.
Hope this can help.
All Answers
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.
As your friend suggested, it is better to write/update the value during trigger. Thus saving you a process time.
Hope this can help.
Why would i want to create a trigger just to populate a field value?? Although formual fields take some processing i dont think we would explictly need to write trigger for this scenario. We can as well make it an input field and populate it via process builder and then as the field is read only its ok to use formula field