<flowAccesses> not included on Profile when retrieving Metadata by Package Name #2856
Labels
investigating
We're actively investigating this issue
owned by another team
The Salesforce CLI team does not own this work but will pass on the information to the correct team.
validated
Version information for this issue has been validated
Summary
<flowAccesses>
not included on Profile xml metadata when retrieving metadata using sf CLIproject retrieve start
by Package Name (-n
) attribute.Example CLI:
sf project retrieve start -t path/to/dir -n {CHANGE_SET_NAME} --api-version 60.0
Steps To Reproduce
a) Create a simple Screen Flow (the logic or content of the flow is not relevant).
b) Edit Access for the flow just created, then add permission to execute the flow to at least 1 Profile. example:
c) Create a Outbound Change Set, give it a name (the name will be used on the CLI later)
d) Add the "Flow Definition" component created on step a) the change set
e) Add the "Profile(s)" that you configured on step b) to the change set
f) Run the following CLI, replacing the CHANGE_SET_NAME with the name you gave to your change set.
g) On the package retrived, open one of the profiles files retrived (eg. profileName.profile) and notice that
<flowAccesses>
node is not included on its content.So when I try to deploy the package to another org, the flow permission are lost.
Extra Information and some extra tests I did:
This is the package.xml resulted from the CLI above:
Inspired on this article https://gearset.com/blog/what-is-the-salesforce-metadata-flowaccesses/ I modified the package.xml above and included a "FlowDefinition" metadata type as per below.
then I ran the following CLI based on the package manifest above
and voila!! now the profile metadata was retrieved with the content.
As per the article and salesforce own documentation, FlowDefinition type was deprecated a while back, so I wonder why is it necessary in this case and b) why retrieving metadata by the package name would not included it automatically.
Expected result
The profile file retrieved should contain a XML node as per below:
Actual result
<flowAccesses>
content is not present in the profile metadata.System Information
MacOS -> Terminal on VS Code
Additional information
The text was updated successfully, but these errors were encountered: