I'm a fan of change sets to migrate my development work from a Salesforce sandbox to production. (Check out the Trailhead module on change sets here). After I make my updates, I create an outbound change set and add all those updates to the change set. Assuming the deployment settings in my production org allow inbound change sets from the sandbox, I upload from the sandbox to my production org. That change set encapsulates all the updates which will be validated and deployed (or not) together. That is, if the deployment fails, all of the updates get rolled back.
After a few minutes (wait even a few minutes beyond when you get the email telling you the upload succeeded), switch to the production org, open Setup and go to the Inbound Change Sets. From there, select the new change set and choose Validate. Once that kicks off, switch to the Deployment Status Page and watch the green circle fill in. Assuming it stays green, the next step is Deploy.
Sometimes, however, that circle turns red and the validation fails. Usually the issue is that I've left something out of the change set (for instance an updated page layout includes a new custom field that I forgot about).
After a few minutes (wait even a few minutes beyond when you get the email telling you the upload succeeded), switch to the production org, open Setup and go to the Inbound Change Sets. From there, select the new change set and choose Validate. Once that kicks off, switch to the Deployment Status Page and watch the green circle fill in. Assuming it stays green, the next step is Deploy.
Sometimes, however, that circle turns red and the validation fails. Usually the issue is that I've left something out of the change set (for instance an updated page layout includes a new custom field that I forgot about).
In most cases, the error messages are pretty clear. I've found that error messages related to Flows may be rather cryptic. (Under the covers, Process Builder processes are flow definitions). In the screenshot above, you can see a reference to 'myRule_5_A1.' I promise I don't label any of my nodes or actions like that! So I was initially puzzled... where do I begin to figure out the issue?
It turned out not to be so difficult. From the Deployment Status page, click 'View Details' beside the name of the change set that failed the validation. On the Deployment Details page, the Component Errors section shows the API name for each component with an error. From that Deployment Details page, click on the change set name and find the component with the API name of the failing component, then click 'View Source' beside that component's name. Now you're looking at an XML file which has the component's metadata. You may feel that we've gone from bad to worse.
Don't give up; you don't really need to read the XML! With the XML page open perform a search for that strange reference, in my case 'myRule_5_A1.' Once you find that within a <name> tag, you can see the corresponding action name. Now I see what the root problem is; that action is what I left out of my change set. So I go back to the sandbox, clone my change set and add this missing action. Upload, validate and deploy!
Comments
Post a Comment