Skip to main content

Change sets - cryptic validation error messages

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).
Validation status - FAILED

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.

Change set XML extractDon'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

Popular posts from this blog

Salesforce reporting: XL-Connector and VBA

In an earlier post , I mentioned a tool I'm using to import Salesforce data - via SOQL or existing reports - into Excel. This post is more about using that tool, XL-Connector from Xappex . Here, I'll walk through the (simple) process of importing and refreshing a report, and I'll provide a simple VBA macro to automate the refresh. In a future post, I'll expand on that macro to show a friendly view of my opportunity pipeline and a single-page view of how each of my sales reps are doing against a series of KPIs. Importing a report is simple enough. From the XL-Connector tab, select Log In and enter your credentials. I'm using the old id and password (as opposed to SSO), so I provide that along with my 'token'.  (Don't remember your token? Log in to Salesforce via your browser, click on your photo, select Settings, then 'reset my security token'.) Once you're logged in the lock turns green. Back in Excel, on the XL-Connector tab, select ...

Salesforce Pipeline Reporting - part 1 of 3

In a dozen (plus) years working with Salesforce, I've never been entirely happy with the built in reporting of my opportunity pipeline. I can export details, or a printed (formatted) view, but I lose the interactivity. I can use a dashboard, which is better now in Lightning in that I can see a lot more fields in a table component. But flexible views require filtered dashboards, and just maintaining the filter values (if they go down to a rep level) can be onerous. Plus applying (or removing) a filter tests my (very limited) patience. So I've typically exported the report details into Excel, and there created a workbook that includes (1) summary info, (2) scrollable deal lists with hyperlinks back to the opportunity records in Salesforce and (3) filters that let me instantly switch views, say among teams, reps, opportunity types, or fiscal periods. My process around this involved LOTS of VBA and LOTS of formulas. Lately, I've (finally) gotten turned on to slicers in Exc...

A personal dashboard keeping my (Salesforce) house in order

I've put a 'penalty box' on my reps' dynamic dashboard. This section of their dashboard calls out items that they own that require attention. Their penalty box includes issues such as open opportunities with a close date in the past forecasted opportunities with no quote issued open opportunities that include inactive SKUs MQLs that haven't been addressed after some period of time stale opportunities (untouched in, say, 30 days) early-stage opportunities with near-term close dates These are intended to keep the reps honest and help them keep their pipeline clean. But I have my own Salesforce hygiene issues to keep up with. So I've created my own dashboard to keep these front and center. I can't necessarily fix all the issues today (who gets those leads when the territory is vacant?), but I want to fix what I can, and then keep sight of others needing attention. My personal cleanup dashboard includes the following: Open opportunities ow...