Project Management App Deployment Example

Learn how the metadata and data deployment feature in DX Inspector resolves metadata and data dependencies and preserves record relationships, using a sample app.

Required Editions

Available in: Lightning Experience
Available in: Professional, Enterprise, Performance, Unlimited, and Developer Editions

Consider a scenario where you’re building an app to manage and track projects. You’ve created these metadata components and data records in your sandbox and are ready to deploy them.

  • Project__c (metadata and data): The custom object (metadata) and its parent records (data).
  • Project_Milestone__c (data): The detail records (child records) associated with the project.
  • Due_Date__c (metadata): A custom field on the Project_Milestone__c object.
  • MilestoneAlert.trigger (metadata): Apex code that references the Due_Date__c field.

Metadata and Data Relationships

Here’s a look at the metadata and data relationships in your sandbox.

  • Metadata-to-metadata dependencies: MilestoneAlert.trigger depends on the Due_Date__c field. If you select the trigger, the feature automatically preselects the field.
  • Data-to-data dependencies: To maintain the master-detail relationship, the feature deploys the parent Project__c records before the child Project_Milestone__c records. This action makes sure that the new record IDs map correctly in the target org.
  • Data-to-metadata dependencies: The Project__c custom object must exist in the target org so the feature can migrate the associated Project__c records.

Deployment Consistency

The metadata and data deployment feature scans metadata-to-metadata and data-to-data relationships in your sandbox. Here’s how the feature maintains metadata and data consistency during deployment.

For detailed steps, see Deploy Metadata and Data to a Target Org.

  • If you select the Due_Date__c field, the metadata and data deployment feature detects and preselects MilestoneAlert.trigger.
  • If you select the Project_Milestone__c object, the feature preselects the parent Project__c object. You can configure and narrow the set of records by selecting a unique external ID and applying filters.
  • During deployment, the metadata and data deployment feature creates the metadata structure (field and trigger) in the target org first. Then, it migrates the records while maintaining the parent-child relationships.