0

When I create an custom object I also creating custom fields for this custom object, the custom field is created empty without any data or value just an empty custom field. I need help with how can I add data to the custom field in time of creation the custom field? what is the correct apex code to do such a thing I tried a lot of stuff but not working.

1
  • 1
    did you look at the default value option on the custom field definition; this would let you default a value to a constant or to a formula based on contextual values such as properties of a running user Commented Dec 13, 2021 at 0:39

1 Answer 1

3

Salesforce does not provide a feature to populate a new custom field on existing records.

The exceptions are formula fields (which are re-calculated every time the field is accessed via the UI or query) and possibly roll-up summary fields.

The most appropriate tool to populate new fields on existing records is likely something like the Salesforce-provided DataLoader or dataloader.io (which can handle millions of records)

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.