You need to sign in to do that
Don't have an account?
Daniel Fuller017920529519823092
How do I retrieve/deply Workflow Rules using the Ant SalesForce Migration Tool?
Hello everyone!
I have been working on this one for a few hours and can't seem to figure it out.
I need to migrate a workflow rule from one sandbox to another. I know that workflow rules are somewhat special in that they have multiple metadata types associated to them (i.e. Workflow, WorkflowRule, WorkFlowTask, WorkflowAlert, etc.)
I am currently using the following XML package to designate the workflow I want to retrieve. I double-checked and there are only a set of field upates associated to the rule so I figured this is how I would do it.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members> Project.PSA_Project_Default_on_Creation </members>
<name> WorkflowRule </name>
</types>
<types>
<members> Project.Check_Share_with_Project_Manager </members>
<members> Project.Check Share_with_Project_Resources </members>
<members> Project.Check Allow_Expenses_without_Assignment </members>
<members> Project.Set_Billing_Type_to_T&M </members>
<members> Project.Check_Allow_Timecard_without_Assignments </members>
<members> WorkflowFieldUpdate </members>
</types>
<version>30.0</version>
</Package>
Using the Ant tool, I am using the following target script:
<target name="retrieveUnpackaged">
<mkdir dir="retrieveUnpackaged"/>
<!-- Retrieve the contents into another directory -->
<sf:retrieve username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" retrieveTarget="retrieveUnpackaged" unpackaged="unpackaged/package.xml"/>
</target>
I then type ant -propertyfile <propertyfile name> retrieveUnpackaged in the command-line and the retrieve builds successfully. However, the problem is that I receive a warning message stating, "package.xml - Entity type: 'WorkflowRule' is unknown" and none of the other workflow rule components are retrieved into the directory I have specified.
Could someone provide insight into what could be the problem? Thank you in advance!
I have been working on this one for a few hours and can't seem to figure it out.
I need to migrate a workflow rule from one sandbox to another. I know that workflow rules are somewhat special in that they have multiple metadata types associated to them (i.e. Workflow, WorkflowRule, WorkFlowTask, WorkflowAlert, etc.)
I am currently using the following XML package to designate the workflow I want to retrieve. I double-checked and there are only a set of field upates associated to the rule so I figured this is how I would do it.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members> Project.PSA_Project_Default_on_Creation </members>
<name> WorkflowRule </name>
</types>
<types>
<members> Project.Check_Share_with_Project_Manager </members>
<members> Project.Check Share_with_Project_Resources </members>
<members> Project.Check Allow_Expenses_without_Assignment </members>
<members> Project.Set_Billing_Type_to_T&M </members>
<members> Project.Check_Allow_Timecard_without_Assignments </members>
<members> WorkflowFieldUpdate </members>
</types>
<version>30.0</version>
</Package>
Using the Ant tool, I am using the following target script:
<target name="retrieveUnpackaged">
<mkdir dir="retrieveUnpackaged"/>
<!-- Retrieve the contents into another directory -->
<sf:retrieve username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" retrieveTarget="retrieveUnpackaged" unpackaged="unpackaged/package.xml"/>
</target>
I then type ant -propertyfile <propertyfile name> retrieveUnpackaged in the command-line and the retrieve builds successfully. However, the problem is that I receive a warning message stating, "package.xml - Entity type: 'WorkflowRule' is unknown" and none of the other workflow rule components are retrieved into the directory I have specified.
Could someone provide insight into what could be the problem? Thank you in advance!
kevin lam
It should be <name>Workflow</name> in your package.xml file. The definition of the rule and associated field updates are stored in the .worlflow file.