Change Management: 10% Flashcards
Describe the options available to move metadata between environments (change sets, Salesforce extensions for Visual Studio Code). Describe the capabilities and best practices for using change sets to move metadata between environments.
What are the tools, provided by Salesforce, that you can use to customize and code changes for your org in a sandbox?
- Develop and Deploy Apex in the Developer Console: The Developer Console is an integrated development environment with a collection of tools you can use to create, debug, and test applications in your Salesforce org.
- Develop and Deploy Using Salesforce Extensions for Visual Studio Code: Salesforce Extensions for VS Code is powered by Salesforce CLI and the Salesforce APIs. Together with Visual Studio Code, the Salesforce extension pack provides a robust development environment. Deploy to and retrieve from your sandboxes and other development orgs. Manage, push to, and pull from your scratch orgs. Write, debug, and refactor your org’s code.
- Develop and Deploy Using Metadata API: Use Metadata API to retrieve, deploy, create, update or delete customization information, such as custom object definitions and page layouts, for your org. This API is intended for managing customizations and for building tools that can manage the metadata model, not the data itself.
- Deploy Using the Ant Migration Tool: Download the Ant Migration Tool if you want to perform a file-based deployment of metadata changes and Apex classes from a Developer Edition or sandbox org to a production org using Apache’s Ant build tool.
- Deploy Using Change Sets: You can deploy workflows, rules, Apex classes and triggers, and other customization from a sandbox org to your production org. You can create an outbound change set in the Salesforce user interface and add the components that you want to upload and deploy to the target org.
How do approval processes behave in Change Sets?
Approval Processes
- If the approval page fields include any custom fields on standard objects, manually add those custom fields to outbound change sets. The View/Add Dependencies option for selecting change set components won’t include these fields.
- If the approval process references any post templates that contain custom fields, resave those post templates in the originating organization before adding them to the change set. From Setup, enter Post Templates in the Quick Find box, then select Post Templates. For each post template, click Edit and then Save.
- Change sets don’t include the order of active approval processes from the source org. Sometimes you must reorder the approval processes in the destination org after deployment.
- If you change the Unique Name of an approval process that was previously included in a change set and deployed in another organization, and you resend the approval process via a change set, a new approval process is created upon deployment in the other organization. The previously deployed approval process isn’t modified.
How do you need to prepare or modify Apex Classes and Apex Triggers to work with change sets?
Apex Classes and Apex Triggers
By default, changes to Apex code that has Apex jobs pending or in progress can’t be deployed. To deploy these changes, do one of the following.
- Cancel Apex jobs before deploying changes to Apex code. Reschedule the jobs after the deployment.
- Enable deployments with Apex jobs in the Salesforce user interface in the Deployment Settings page.
How do you need to prepare or modify custom fields to work with Change Sets?
Custom Fields
To change the data type of a custom field, you can use change sets. However, the deployment is sometimes delayed as many records are updated. Consider changing the target org through the user interface, instead.
How do you need to prepare for or modify custom objects in relation to Change Sets?
Custom Objects
- You can encounter an error if you’re deploying a change set with a custom object that has a parent-child relationship without the master/detail field in the same change set. To resolve this error, include the master/detail custom field in the change set, even if you haven’t changed the org-wide default.
- Simultaneously inserting a custom object, updating the sharingModel field for an object, and adding a new owner-based sharing rule isn’t supported. Instead, three separate deployments are required. First, deploy the custom object, then deploy the updated sharingModel for the object, and then deploy the new owner-based sharing rule. You can update the sharingModel field and add a criteria-based or guest user sharing rule in one deployment.
How do you need to prepare for or modify flows in relation to Change Sets?
- If you plan to deploy a flow with change sets, consider limitations in migration support. Make sure your flows reference only fields and components that are available in change sets.
- You can include only one version of a flow in a change set.
- If the flow has no active version when you upload the outbound change set, the latest inactive version is used.
- When you view the dependent components for the change set, the Component Dependencies page lists the dependencies for all versions of the flow. Add all interdependent components for the relevant flow version to the outbound change set.
- An active flow in a change set is deployed to its destination as inactive. Activate the flow manually after deployment.
- Deploying or redeploying a flow with change sets creates a version of the flow in the destination org.
How do you need to prepare for or modify Lightning Email Templates in relation to Change Sets?
Lightning Email Templates
An email template created in Email Template Builder that contains inline images with references to Salesforce Files can’t be added to packages or change sets.
How do you need to prepare for or modify Page Layouts in Change Sets?
Page Layout
A deployment containing a profile and record type, but not the assigned page layout for that record type, removes the existing layout assignment from the profile for that record type. Always include all page layouts for all required record types in the change set.
How do you need to prepare for or modify Picklist Values in Change Sets?
Picklist Values
Values for a picklist field in a target org that aren’t included in the change set are set to inactive.
For example, if the target org’s picklist includes an active value of 1, and the change set’s picklist doesn’t include 1 as a value, 1 changes from active to inactive in the target org.
How do you need to prepare for or modify Sharing in relation to Change Sets?
Simultaneously updating the sharingModel field for an object and adding a new owner-based sharing rule isn’t supported. You can add an owner-based sharing rule when the org-wide default is public, and then update the sharingModel, which would result in a single sharing recalculation. You can deploy a criteria-based or guest user sharing rule and changes to the sharingModel field together using change set components.
How do you need to prepare for or modify Apex Classes and Apex Triggers in relation to Change Sets?
Apex Classes and Apex Triggers
By default, changes to Apex code that has Apex jobs pending or in progress can’t be deployed. To deploy these changes, do one of the following.
Cancel Apex jobs before deploying changes to Apex code. Reschedule the jobs after the deployment.
Enable deployments with Apex jobs in the Salesforce user interface in the Deployment Settings page.
How do you need to prepare for or modify Approval Processes in relation to Change Sets?
Approval Processes
- To use approval processes on Salesforce Knowledge articles with the Metadata API, the article type must be deployed. For article version (_kav) in approval processes, the supported action types are: Knowledge Action, Email Alert, Field Update, and Outbound Message.
- If the approval process references any post templates that contain custom fields, resave those post templates in the originating organization before adding them to the change set. From Setup, enter Post Templates in the Quick Find box, then select Post Templates. For each post template, click Edit and then Save.
- The metadata doesn’t include the order of active approval processes. You might need to reorder the approval processes in the destination org after deployment.
- If you change the Unique Name of an approval process that was previously included in a change set and deployed in another organization, and you resend the approval process via a change set, a new approval process is created upon deployment in the other organization. The previously deployed approval process isn’t modified.
How do you need to prepare for or modify Approval Processes in relation to Change Sets?
Custom Fields
Starting in API version 30.0, when deploying a new custom field, the default values for the editable and readable fields in profile field permissions are false. To override the default values, include field permissions for the new field in your profiles.
How do you prepare for or modify Custom Objects in relation to Change Sets?
Custom Objects
Simultaneously inserting a custom object, updating the sharingModel field for an object, and adding a new owner-based sharing rule isn’t supported. Instead, three separate deployments are required. First, deploy the custom object, then deploy the updated sharingModel for the object, and then deploy the new owner-based sharing rule. You can update the sharingModel field and add a criteria-based or guest user sharing rule in one deployment.
How do you prepare for or modify Connected Apps in relation to Change Sets?
Connected App
- You can’t set the consumerKey in Metadata API. It’s included in a retrieve operation for informational purposes. If you try to move the connected app to another org, you must remove the consumerKey from the .zip file before the deployment to an org. A new key is generated in the destination org.
- Mobile settings of connected apps aren’t supported in change sets and must be manually migrated.
How do you prepare for or modify Groups in relation to Change Sets?
Groups
Members of the public group aren’t migrated when you deploy the group type.
How do you prepare for or modify Master-Detail Relationships in relation to Change Sets?
Master-Detail Relationships
A Metadata API deployment that includes Master-Detail relationships deletes all detail records in the Recycle Bin in the following cases.
- For a deployment with a new Master-Detail field, soft delete (send to the Recycle Bin) all detail records before proceeding to deploy the Master-Detail field, or the deployment fails. During the deployment, detail records are permanently deleted from the Recycle Bin and can’t be recovered.
- For a deployment that converts a Lookup field relationship to a Master-Detail relationship, detail records must reference a master record or be soft-deleted (sent to the Recycle Bin) for the deployment to succeed. However, a successful deployment permanently deletes any detail records in the Recycle Bin.