12

I'm using Salesforce Migration Tool (Ant) to deploy flows and processes. If memory serves, so long as the flow in the destination org was not activate (or deactivated) I could overwrite it. If you didn't disable the flow first, I'd get this error:

Error: The version of the flow you're updating is active and can't be overwritten

Now I am getting an error that tells me that the flow "was" active and cannot be overwritten, even after disabling the flow in the target org:

Error: The version of the flow you're updating was active and can't be overwritten

Perhaps this was the way it has always been and I'm just taking crazy pills. Either way, the only way I see around this is to create a new version all flows I want to deploy each time I want to deploy them. Or, never make the deployed flows activate in the target org, which will make testing them quite difficult.

Any suggestions on ways to numb this pain?

11

Once activated, a flow version can never be modified. In fact, about the only reasonable approach is to delete all paused interviews, deactivate the current flow version, delete all references to the flow, delete the flow entirely, then deploy the flow and all its references back in place.

This restriction exists because if a flow was active, it could have paused interviews or interviews already in progress, and so changing the flow's properties could invalidate those interviews. This is obviously an undesirable state since users would lose data, but it'd be a lot handier if Salesforce would simply check to see if there were any paused or active interviews and allow deletion or modification of a version if it's reasonably safe to do so.

  • 1
    Deleting all references in the target org to all flows in question solved the problem. This inconvenience might also be circumvented if the Salesforce Migration Tool didn't try to deploy a flow that hasn't changed. – Swisher Sweet Sep 10 '15 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.