+ Start a Discussion
Sumit Verma 33Sumit Verma 33 

Storing formula field value

Can we store formula field value in system? If Yes, Then How?
Khan AnasKhan Anas (Salesforce Developers) 
Hi Sumit,

Greetings to you!

The formula fields only store the formula in the database. They don't store the result of the formula.  The result of the formula only exists when a record is looked at (queried) by a user or some process. This ensures formula fields are always accurate and up-to-date and they get recalculated instantly.

By default, formula fields don’t have underlying indexes, so they require full scans to find target records. They also have to calculate values on the fly because actual values are not stored in the database.

However, you can create a custom field and populate that field with formula field value using a workflow or trigger.

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas