function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

how to calculate formula field in sobject?

Suraj MakandarSuraj Makandar

Formula fields are automatically calculated. So every time you visit the record you will see the updated/new values.

Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi sivakoteswararao,

Basically a formula field  is used to  automatically calculate the value of a field based on other fields.So whenever you want to calculate a value based on other fields then you can create a formula field .
In formula you can use values of fields, operators, functions, literal values, or other formulas and frame a formula according to your requirements.

Please refer below link which might help you further. ( (

Hope this helps you
Let me know if this helps you. Kindly mark it as solved so that it may help others in future.

Thanks and Regards
Fernando Rodrigues Ribeiro Martins 8Fernando Rodrigues Ribeiro Martins 8

Hi everyone,

SIVAKOTESWARARAO DUDDUKURI, you can use this 'Formula' class.

Here is the link for documentation:

Formula Class (