Hello @scolladon,
Unable to deploy destructiveChange with a workflowRule object:
Salesforce deployment status:
API Name | Type | Line | Column | Error Message
-- | -- | -- | -- | --
Lead | Workflow | 0 | 0 | Cannot delete a workflow object; Workflow Rules and Actions must be deleted individually
Destructive change xml:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Lead.DWIN2_AlertRequestAcknowledgment</members>
<members>Lead.DWIN2_AlerteVehiculeQuoteAcknowledgment</members>
<members>Lead.DWIN2_NewQuoteVehicule</members>
<members>Lead.DWIN2_VehicleQuote_NeedPicture</members>
<members>Lead.DWIN2_VehicleQuote_Unanswerable</members>
<members>Lead.DWIN2_Vehicle_Quote_Unanswerable_Condition_Notmet</members>
<members>Lead.DWIN2_Vehicle_Quote_Unanswerable_Excessive</members>
<members>Lead.DWIN2_Vehicle_Quote_Unanswerable_No_Answer</members>
<members>Lead.DWIN2_EmailAlert_Lead_RH_Acknowledgment</members>
<members>Opportunity.DWIN2_Quote_reminder_Email_Alert</members>
<name>WorkflowAlert</name>
</types>
<types>
<members>Lead</members>
<name>Workflow</name>
</types>
<version>48.0</version>
</Package>
I tryed without the below part, and it worked fine
<types>
<members>Lead</members>
<name>Workflow</name>
</types>
So destructive file should be :
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Lead.DWIN2_AlertRequestAcknowledgment</members>
<members>Lead.DWIN2_AlerteVehiculeQuoteAcknowledgment</members>
<members>Lead.DWIN2_NewQuoteVehicule</members>
<members>Lead.DWIN2_VehicleQuote_NeedPicture</members>
<members>Lead.DWIN2_VehicleQuote_Unanswerable</members>
<members>Lead.DWIN2_Vehicle_Quote_Unanswerable_Condition_Notmet</members>
<members>Lead.DWIN2_Vehicle_Quote_Unanswerable_Excessive</members>
<members>Lead.DWIN2_Vehicle_Quote_Unanswerable_No_Answer</members>
<members>Lead.DWIN2_EmailAlert_Lead_RH_Acknowledgment</members>
<members>Opportunity.DWIN2_Quote_reminder_Email_Alert</members>
<name>WorkflowAlert</name>
</types>
<version>48.0</version>
</Package>
Hi @alex9138,
Can you share the result of this git command please :
$ git diff --name-status --no-renames <from> <to>
I need to know if the workflow file has been removed or if it has been modified to remove some of the Workflow Alert (I guess it just contains some removal of Workflow Alert but I want to be sure)
EDIT : see other comments
@scolladon the workflow file was containing only alerts and there was all removed, so file was empty, hence (I guess) we removed it
Hum...
I feel a little bit confused
The git line shows a A (addition) for Lead.workflow-meta.xml :
A force-app/main/default/workflows/Lead.workflow-meta.xml
It should display a M or a D
Maybe the order of the parameters passed to git are not the same as the command.
This is the result of $ git diff --name-status --no-renames <from> <to> ?
Upside down ^^
$ git diff --name-status --no-renames origin/master HEAD | grep workflow
D force-app/main/default/workflows/Lead.workflow-meta.xml
D force-app/main/default/workflows/Opportunity.workflow-meta.xml
Thanks !
Could you test if the PR #39 apply the correct fix ?
Thanks in advance
Ok let me try it :)
In the meantime I got a new one in the same "style":
{
"changed": "false",
"componentType": "CustomObjectTranslation",
"created": "false",
"createdDate": "2020-07-03T14:33:59.000Z",
"deleted": "false",
"fileName": "destructiveChanges/objectTranslations/Activity-fr.objectTranslation",
"fullName": "Activity-fr",
"problem": "The CustomObjectTranslation called '\''Activity-fr'\'' is standard and cannot be deleted",
"problemType": "Error",
"success": "false"
},
I guess it means that you should keep an eyes on all standard object translation and not add them :/
@scolladon it is OKay on my side for workflow rules, do you want me to open a new issue for standard object translation?
@alex9138 yes please create another issue for the translation, I will investigate it there (even if I am not sure of what the tool can do for that as it should not be deleted)
Thanks for your feedback on the PR for the current issue, I will create the unit test, validate the PR and then close this issue !
new version v3.1.3 :)