-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SFDX CLI does not deploy Standard SObject workflow elements -- Deployed Source No results found #707
Comments
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
I can confirm that I am also seeing this issue |
this issue is still happening in Windows 10 as well, does anyone have an ETD? |
Hi We are not able to deploy the WorkFlowAlert and Workflow Rule with sfdx-cli/7.81.0-7b953c80d1 win32-x64 node-v12.18.3 version.Whenever we try to deploy the WorkFlowAlert and Workflow Rule it is saying "No Result Found" and showing an success message that deployment is successfull. |
I fixed the issue by adding the Workflow types element to my package.xml along with my workflow items </types>
<members>MY_SOBJECT.MY_FIELD_UPDATE_NAME</members>
<name>WorkflowFieldUpdate</name>
</types>
<types>
<members>MY_SOBJECT.MY_TASK_NAME</members>
<name>WorkflowTask</name>
</types>
<!-- this one is the important -->
<types>
<members>MY_SOBJECT</members>
<name>Workflow</name>
</types>
<!-- this one is the important -->
|
@geraemartinez -- Thanks for the suggestion but that won't work in my case. If I specify the Workflow element for Account or Case, I end up with all workflow rules on the SObject found in the org and not just the select rules that pertain to my application alone. The Metadata API guide does say that this approach of specifying the individual rules is permissible and thus my only conclusion is that it is a bug with CLI. |
@ImJohnMDaniel I agree, this was not happening before, my approach is just a temporary workaround (I hope), anyway, just to explain more my solution, when I am packaging my solution I am only retrieving specific workflow rules of the Account and Lead objects, not all of them, just as we normally used to do, specifying WorkflowTask, WorkflowFieldUpdate, etc. then when I finished, I go to the workflow rules to make sure that I only see the elements that I specified in my package.xml, if so I add the workflow type ( hope it helps. |
Based on Metadata Tags separate deploy or even Item deploy should be possible. But in practice, it does not work with SFDX CLI. As I found only way CLIS pull say Workflow on COntact is by pulling in Contact.workflow file that has ALL WF rules and other components even Packaged one. BUt if I want only to manage my custom parts it seem to be broken |
This is still broken on 7.89.2 The workaround seems OK, but I would do it a little differently. I would create a separate retrieve_workflow.xml and deploy_workflow.xml, and maybe package.xml would be my final. This works But the normal way is definitely a bug! |
I am still facing this issue even on 7.98.0 version as well. |
I am still facing the issue even on sfdx-cli/7.99.0 darwin-x64 node-v12.18.3 A workaround is do deploy using MDAPI instead of source API, this way we don't need to include workflow metadata, only WorkflowAlert |
This issue still persists in version 7.102.0. I changed the name of a workflow rule and it deleted the workflow rule with the old name but didn't create the one with the new name. |
The issue is still in the sfdx-cli/7.108.0 win32-x64 node-v14.17.1 |
@IVerkhosh - have you tried this using the new source plugin beta? See the announcement here: #1057. The plugin will become the production version very soon (maybe even this week Thursday) so knowing if the new plugin fixes the issue is really helpful. |
Hi @ shetzel, |
@IVerkhosh - you no longer need to install the beta plugin since it's no longer beta and being used as a core plugin. so if you're running the latest CLI version then you have the latest and don't need to do anything else. However, I know that this still doesn't work correctly. Workflows as well as other parent types (e.g., SharingRules) that are not decomposed all have this problem and I'm working on a solution for them. |
Hi @shetzel - thank you for the update. At this time I have to PC's with two different versions, 7.110 and 7.116 |
@IVerkhosh - thanks I'll let you know when it's in the plugin. |
I believe I have this fixed in the SDR repo with this PR: forcedotcom/source-deploy-retrieve#446 Once it's approved and merged and consumed in the source plugin and CLI I'm hopeful that these parent types work better for everyone. |
Same problem here on version |
The current CLI release candidate (7.118.1) should have the fix for people to try. Feel free to install the RC to test, then go back to the production CLI version. The RC will be promoted this Thursday. |
This issue has been automatically closed because there has been no response to our request for more information from the original author. Currently, there is not enough information provided for us to take action. Please reply and reopen this issue if you need additional assistance. |
I have exactly the same issue today deploying Opportunity standard object Email Alerts or Workflow Rules using CLI 7.119.2 win32-x64 I receive the following error messages: An object XXX of type WorkflowAlert was named in package.xml, but was not found in zipped directory Any idea about how to fix it? |
I am also facing this issue, while deploying WorkflowAlert, I am getting the below error. |
@vineet-goel-salesforce - Are you trying to deploy a WorkflowAlert individually, meaning without the parent Workflow? That won't work. Children of Workflows cannot be deployed like children of CustomObjects because Workflows are not decomposed. You'll have to deploy the entire Workflow. E.g., EDIT: now that I read the whole thread, I don't think this was ever supported and I don't see anything in the metadata API docs that state it should be possible. Looks like the tooling API supports this but the CLI uses the metadata API for deploy/retrieve. |
@shetzel but what happens if I just want to deploy one WorkflowAlert? |
@shetzel - In my case I have Email Alert and that alert has been used in apex, hence I only want to deploy email alert (WorkflowAlert) and class, I don't want to deploy my sObject WorkflowRule, FieldUpdate and OutboundMessage, how can I achieve that through Metadata API? |
@shetzel why it is possible to retrieve the Children of Workflows using a package.xml file that only contains those elements but you receive the error message if you try to deploy them using exactly the same file? @vineet-goel-salesforce you can do it by removing all the other elements in the workflow element and deploying the workflow instead. |
I am also facing this problem |
The best work-around I've found is to use a retrieve package.xml that specifies the individual pieces, then a deploy package.xml with the entire workflow. I'm still queasy with this approach because it means I need to keep two package files in-sync. Using sfdx-cli/7.147.1 darwin-x64 node-v16.15.0 |
@mshanemc what additional information are we missing here? I'm running into the issue still today.
|
HI all, I think this case needs to be reopened so that Shane puts it back on the pile. |
I am still seeing this in the sf CLI on v2.24.4 and have to use @geraemartinez referenced above from years ago |
Summary
Salesforce CLI appears to be unable to deploy workflow elements for Standard objects when those workflow elements are specified in the package.xml as individual metadata elements (i.e. WorkflowRule, WorkflowAlert, WorkflowFieldUpdate, etc.) and not as a whole workflow metadata element (i.e. Workflow).
Steps To Reproduce:
Expected result
The workflow elements should be deployed to the target org
Actual result
No deployment occurs. The error seen is:
Additional information
SFDX CLI Version(to find the version of the CLI engine run sfdx --version):
SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)
OS and version:
MacOS v10.15.7
The text was updated successfully, but these errors were encountered: