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
Abhishek Thakur 17Abhishek Thakur 17 

Metadata Deployment order

Hello,

I want to know in what order should we start Metadata deployment? I will be using one of the tools to deploy. But I want to know what components need to be deployed first and in what order we need to deploy?
Sai PraveenSai Praveen (Salesforce Developers) 
There is no such order for the deployment. Usuakky if you have any steps which is stopping you to deploy the remaining you will deploy them first and remainning later.

You can validate the package before deployment so you get to know if there is any issue in the package.

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,
Abhishek Thakur 17Abhishek Thakur 17

We will be using gearset for deploying the metadata,So we need a order on which components need to be deployed first.

Like first we need to object - Fields

after that is there any order to follow?

mukesh guptamukesh gupta
Hi Abhi,

Deployment order is salesforce standard operation. so there is no order.

For Example:- 

if you have created new custom fields and use these refference in apex class, trigger and process builder etc after that if you try to deploy only apex class, trigger without custom fields then you will face deployment failufre error. So salesforce automaticaly found what part of metadata is missing in current deployment.


if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh

 
Naveen KNNaveen KN
To be precise, there is no order of deploying the components. We usually include all the updated or newly created components in a single package and deploy it to the higher orgs. 

In case of any errors during the validatiom, we add missed components and deploy it again.

Example - you created a field in the opportunity object and referenced it in the component x. In the package, you included component x but not the opportuity object xml where new field is available, which throws the error while deploying. Including the opportunity object xml with the same package and deploying will resolve the issue.