Open
Description
Summary
I am trying to use the beta for the decomposed metadata types, and running into another issue. I was able to reproduce it in a couple different orgs.
I am trying to deploy a CustomField and a WorkflowFieldUpdate for the Lead object at the same time. I see this error: Error parsing file: Element {http://soap.sforce.com/2006/04/metadata}fieldUpdates invalid at this location in type CustomObject
.
If the CustomField isn't present in the package.xml, then the workflow deploys successfully.
Steps To Reproduce
- Setup a SFDX project that has enabled
decomposeWorkflowBeta
- Create a new Custom Field on the Lead (or any object as far as I know)
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>NewLeadField__c</fullName>
<externalId>false</externalId>
<label>NewLeadField</label>
<length>255</length>
<required>false</required>
<trackFeedHistory>false</trackFeedHistory>
<type>Text</type>
<unique>false</unique>
</CustomField>
- Create a new WorkflowFieldUpdate for the Lead object - I also tested this with a WorkflowAlert and a WorkflowOutboundMessage with the same result
<?xml version="1.0" encoding="UTF-8"?>
<WorkflowFieldUpdate xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>UpdateNewFieldOnLead</fullName>
<field>NewLeadField__c</field>
<name>UpdateNewFieldOnLead</name>
<notifyAssignee>false</notifyAssignee>
<operation>Null</operation>
<protected>false</protected>
<reevaluateOnChange>false</reevaluateOnChange>
</WorkflowFieldUpdate>
- Create a package.xml file with both of the components
<?xml version="1.0" encoding="UTF-8" ?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Lead.NewLeadField__c</members>
<name>CustomField</name>
</types>
<types>
<members>Lead.UpdateNewFieldOnLead</members>
<name>WorkflowFieldUpdate</name>
</types>
<version>64.0</version>
</Package>
- Validate the package:
sf project deploy validate -x manifest/package.xml -w 30
Expected result
The workflow and field should deploy successfully
Actual result
Error: Error parsing file: Element {http://soap.sforce.com/2006/04/metadata}fieldUpdates invalid at this location in type CustomObject
Additional information
System Information
{
"architecture": "darwin-arm64",
"cliVersion": "@salesforce/cli/2.92.7",
"nodeVersion": "node-v20.18.0",
"osVersion": "Darwin 24.5.0",
"rootPath": "/Users/kylecapehart/.nvm/versions/node/v20.18.0/lib/node_modules/@salesforce/cli",
"shell": "zsh",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.2.29 (core)",
"@oclif/plugin-commands 4.1.25 (core)",
"@oclif/plugin-help 6.2.28 (core)",
"@oclif/plugin-not-found 3.2.55 (core)",
"@oclif/plugin-plugins 5.4.39 (core)",
"@oclif/plugin-search 1.2.24 (core)",
"@oclif/plugin-update 4.6.42 (core)",
"@oclif/plugin-version 2.2.28 (core)",
"@oclif/plugin-warn-if-update-available 3.1.40 (core)",
"@oclif/plugin-which 3.2.35 (core)",
"@salesforce/cli 2.92.7 (core)",
6165
"agent 1.22.8 (core)",
"apex 3.6.19 (core)",
"api 1.3.3 (core)",
"auth 3.6.126 (core)",
"code-analyzer 5.0.0 (user) published 49 days ago (Tue Apr 29 2025) (latest is 5.2.1)",
"custom-metadata 3.3.41 (user) published 177 days ago (Sun Dec 22 2024) (latest is 3.3.58)",
"data 4.0.37 (core)",
"deploy-retrieve 3.22.19 (core)",
"info 3.4.65 (core)",
"lightning-dev 2.10.3 (user) published 106 days ago (Mon Mar 03 2025)",
"limits 3.3.56 (core)",
"marketplace 1.3.8 (core)",
"org 5.7.13 (core)",
"packaging 2.9.16 (user) published 135 days ago (Sat Feb 01 2025) (latest is 2.16.0)",
"schema 3.3.65 (core)",
"settings 2.4.29 (core)",
"signups 2.6.10 (user) published 157 days ago (Sat Jan 11 2025) (latest is 2.6.32)",
"sobject 1.4.59 (core)",
"telemetry 3.6.43 (core)",
"templates 56.3.49 (core)",
"trust 3.7.97 (core)",
"user 3.6.25 (core)",
"kc-sf-plugin 1.4.15 (user) published 166 days ago (Thu Jan 02 2025) (latest is 1.4.18)",
"lightning-flow-scanner 2.46.0 (user) published 129 days ago (Fri Feb 07 2025) (latest is 3.24.0)",
"sfdmu 4.38.0 (user) published 170 days ago (Sun Dec 29 2024)",
"sfdx-git-delta 6.3.0 (user) published 133 days ago (Tue Feb 04 2025) (latest is 6.13.1)",
"sfdx-hardis 5.19.1 (user) published 127 days ago (Sun Feb 09 2025) (latest is 5.41.0)",
"texei-sfdx-plugin 2.8.2 (user) published 151 days ago (Fri Jan 17 2025) (latest is 2.8.3)"
]
}