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
DEv NolanDEv Nolan 

How to create a new column in APEX on a custom object and count the current amount of rows down and then loop and fill that column with values based on other fields

Title ^^^ 
ANUTEJANUTEJ (Salesforce Developers) 
Hi Nolan,

Can you elaborate the scenario if it is creating a new field on a custom object then I think you can simply do it using UI from setup. 

Also, have you checked the roll-up summary field or formula field that you can use as per the use case.

In case if the above understanding is not the right one can you elaborate on the scenario with an example.

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.  

Thanks.