Background:
- There is only one version of the process builder exists in sandbox, version number is 1 and it is Active.
- I retrieved this process builder using the command
sfdx force:source:retrieve --sourcepath=/path/to/flow --targetusername=sandbox
(API version is set to 47.0 insfdx-project.json
)
Goal:
Deactivate this process builder by deployment.
Attempt 1:
- Changed value for
status
tag in flow xml toObsolete
and deployed using the commandsfdx force:source:deploy --sourcepath=/path/to/flow --targetusername=sandbox
It didn't deactivate the existing version but created version 2 with Inactive status.
Attempt 2:
- Changed value for
status
tag in flow xml toDraft
and deployed using the commandsfdx force:source:deploy --sourcepath=/path/to/flow --targetusername=sandbox
It didn't deactivate the existing version but created version 2 with Inactive status.
As per the Flow MetadataAPI documentation, status
can be either "Obsolete" or "Draft" and both correspond to Inactive status but it seems to be not working.
I ran all of the above commands using the option --apiversion=47.0
but still same result.