Change sets provide a standard Salesforce deployment mechanism for moving related metadata from a connected sandbox into production. Salesforce explicitly supports deploying custom objects, flows, Apex classes, triggers, and other configuration metadata through outbound and inbound change sets.
Keeping related components in the same deployment mechanism is particularly useful because metadata dependencies must be handled together. For example, a Flow may reference a custom object or Apex action, while an Apex class may depend on that object's fields. Salesforce recommends adding all required interdependent components to the outbound change set to avoid deployment failures.
There is no requirement to move the custom object separately through Metadata API when change sets support all three component types.
Using Developer Console to deploy Apex to production is also inappropriate. Salesforce specifies that production Apex changes should be deployed through mechanisms such as change sets, Salesforce CLI, or Metadata API rather than edited directly through the production user interface.
Therefore, among the available options, packaging all required components and dependencies in change sets is the correct deployment approach.
Study Guide references/topics: Validate and Deploy — Deployment Strategy; Change Sets; Flows; Custom Objects; Apex Classes; Metadata Dependencies.
Submit